类 InsertableLinkedOpenCustomHashSet<T>
java.lang.Object
java.util.AbstractCollection<T>
it.unimi.dsi.fastutil.objects.AbstractObjectCollection<T>
it.unimi.dsi.fastutil.objects.AbstractObjectSet<T>
it.unimi.dsi.fastutil.objects.AbstractObjectSortedSet<T>
it.unimi.dsi.fastutil.objects.ObjectLinkedOpenCustomHashSet<T>
net.neoforged.neoforge.common.util.InsertableLinkedOpenCustomHashSet<T>
- 所有已实现的接口:
it.unimi.dsi.fastutil.Hash
,it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterable<T>
,it.unimi.dsi.fastutil.objects.ObjectCollection<T>
,it.unimi.dsi.fastutil.objects.ObjectIterable<T>
,it.unimi.dsi.fastutil.objects.ObjectSet<T>
,it.unimi.dsi.fastutil.objects.ObjectSortedSet<T>
,Serializable
,Cloneable
,Iterable<T>
,Collection<T>
,SequencedCollection<T>
,SequencedSet<T>
,Set<T>
,SortedSet<T>
public class InsertableLinkedOpenCustomHashSet<T>
extends it.unimi.dsi.fastutil.objects.ObjectLinkedOpenCustomHashSet<T>
Special linked hash set that allow changing the order of its entries and is strict to throw if attempting to add an entry that already exists.
Requires a strategy for the hashing behavior. Use
BasicStrategy.BASIC
or IdentityStrategy.IDENTITY
if no special hashing needed.- 另请参阅:
-
嵌套类概要
从接口继承的嵌套类/接口 it.unimi.dsi.fastutil.Hash
it.unimi.dsi.fastutil.Hash.Strategy<K>
-
字段概要
字段修饰符和类型字段说明private static final long
The number of bits which take up the space for the previous or next position.private static final long
The bitmask for the next element's position.private static final long
The bitmask for the previous element's position.从类继承的字段 it.unimi.dsi.fastutil.objects.ObjectLinkedOpenCustomHashSet
containsNull, f, first, key, last, link, mask, maxFill, minN, n, size, strategy
从接口继承的字段 it.unimi.dsi.fastutil.Hash
DEFAULT_GROWTH_FACTOR, DEFAULT_INITIAL_SIZE, DEFAULT_LOAD_FACTOR, FAST_LOAD_FACTOR, FREE, OCCUPIED, PRIMES, REMOVED, VERY_FAST_LOAD_FACTOR
-
构造器概要
构造器构造器说明Constructs a newInsertableLinkedOpenCustomHashSet
with aBasicStrategy
.InsertableLinkedOpenCustomHashSet
(it.unimi.dsi.fastutil.Hash.Strategy<? super T> strategy) Constructs a newInsertableLinkedOpenCustomHashSet
with the givenHash.Strategy
. -
方法概要
修饰符和类型方法说明boolean
This method will attempt to addelement
after the given elementinsertAfter
in the set.boolean
This method will attempt to addelement
before the given elementinsertBefore
in the set.void
void
private int
Requires thatexistingElement
exists in the set already.从类继承的方法 it.unimi.dsi.fastutil.objects.ObjectLinkedOpenCustomHashSet
add, addAll, addAndMoveToFirst, addAndMoveToLast, addOrGet, clear, clone, comparator, contains, ensureCapacity, first, fixPointers, fixPointers, forEach, get, hashCode, headSet, isEmpty, iterator, iterator, last, rehash, remove, removeFirst, removeLast, shiftKeys, size, spliterator, strategy, subSet, tailSet, trim, trim
从类继承的方法 it.unimi.dsi.fastutil.objects.AbstractObjectSet
equals
从类继承的方法 it.unimi.dsi.fastutil.objects.AbstractObjectCollection
toString
从类继承的方法 java.util.AbstractCollection
containsAll, removeAll, retainAll, toArray, toArray
从接口继承的方法 java.util.Collection
parallelStream, removeIf, stream, toArray
-
字段详细资料
-
LINK_BIT_SPACE
private static final long LINK_BIT_SPACEThe number of bits which take up the space for the previous or next position.- 另请参阅:
-
NEXT_LINK
private static final long NEXT_LINKThe bitmask for the next element's position.- 另请参阅:
-
PREV_LINK
private static final long PREV_LINKThe bitmask for the previous element's position.- 另请参阅:
-
-
构造器详细资料
-
InsertableLinkedOpenCustomHashSet
public InsertableLinkedOpenCustomHashSet()Constructs a newInsertableLinkedOpenCustomHashSet
with aBasicStrategy
. -
InsertableLinkedOpenCustomHashSet
Constructs a newInsertableLinkedOpenCustomHashSet
with the givenHash.Strategy
.- 参数:
strategy
- The strategy to use for adding and getting elements from the set.
-
-
方法详细资料
-
addAfter
This method will attempt to addelement
after the given elementinsertAfter
in the set. If an element matchinginsertAfter
cannot be found with this set'sHash.Strategy
, thenelement
will be added in insertion order. If {#code element} already exists in the set, then the set is not modified.- 参数:
insertAfter
- The element to insertelement
after.element
- The element to add into this set.- 返回:
true
if the element was added to the set.
-
addBefore
This method will attempt to addelement
before the given elementinsertBefore
in the set. If an element matchinginsertBefore
cannot be found with this set'sHash.Strategy
, thenelement
will be added in insertion order. If {#code element} already exists in the set, then the set is not modified.- 参数:
insertBefore
- The element to insertelement
before.element
- The element to add into this set.- 返回:
true
if the element was added to the set.
-
addFirst
-
addLast
-
getPos
Requires thatexistingElement
exists in the set already.
-