Class OrderedSet<E>
- java.lang.Object
-
- com.vladsch.flexmark.util.collection.OrderedSet<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.Set<E>
public class OrderedSet<E> extends java.lang.Object implements java.util.Set<E>, java.lang.Iterable<E>
-
-
Constructor Summary
Constructors Constructor Description OrderedSet()
OrderedSet(int capacity)
OrderedSet(int capacity, CollectionHost<E> host)
OrderedSet(CollectionHost<E> host)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(E e)
boolean
add(E e, java.lang.Object o)
boolean
addAll(java.util.Collection<? extends E> collection)
void
addNull()
void
addNulls(int index)
void
clear()
boolean
contains(java.lang.Object o)
boolean
containsAll(java.util.Collection<?> collection)
java.util.BitSet
differenceBitSet(java.lang.Iterable<? extends E> items)
java.util.BitSet
differenceBitSet(java.util.Iterator<? extends E> items)
boolean
equals(java.lang.Object o)
Indexed<E>
getConcurrentModsIndexedProxy()
Indexed<E>
getIndexedProxy()
int
getModificationCount()
java.util.BitSet
getValidIndices()
E
getValue(int index)
java.util.List<E>
getValueList()
E
getValueOrNull(int index)
int
hashCode()
static <T1> T1
ifNull(T1 o, T1 nullValue)
java.util.BitSet
indexBitSet(java.lang.Iterable<? extends E> items)
ReversibleIterable<java.lang.Integer>
indexIterable()
ReversibleIterator<java.lang.Integer>
indexIterator()
int
indexOf(java.lang.Object element)
boolean
inHostUpdate()
boolean
isEmpty()
boolean
isSparse()
boolean
isValidIndex(int index)
ReversibleIterable<E>
iterable()
ReversibleIndexedIterator<E>
iterator()
java.util.BitSet
keyDifferenceBitSet(java.lang.Iterable<? extends java.util.Map.Entry<? extends E,?>> items)
java.util.BitSet
keyDifferenceBitSet(java.util.Iterator<? extends java.util.Map.Entry<? extends E,?>> items)
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> collection)
java.lang.Object
removeHosted(java.lang.Object o)
boolean
removeIndex(int index)
java.lang.Object
removeIndexHosted(int index)
boolean
retainAll(java.util.Collection<?> collection)
ReversibleIterable<java.lang.Integer>
reversedIndexIterable()
ReversibleIterator<java.lang.Integer>
reversedIndexIterator()
ReversibleIterable<E>
reversedIterable()
ReversibleIndexedIterator<E>
reversedIterator()
boolean
setValueAt(int index, E value, java.lang.Object o)
int
size()
java.lang.Object[]
toArray()
<T> T[]
toArray(T[] array)
void
validateIndex(int index)
java.util.BitSet
valueDifferenceBitSet(java.lang.Iterable<? extends java.util.Map.Entry<?,? extends E>> items)
java.util.BitSet
valueDifferenceBitSet(java.util.Iterator<? extends java.util.Map.Entry<?,? extends E>> items)
java.util.List<E>
values()
-
-
-
Constructor Detail
-
OrderedSet
public OrderedSet()
-
OrderedSet
public OrderedSet(int capacity)
-
OrderedSet
public OrderedSet(@NotNull CollectionHost<E> host)
-
OrderedSet
public OrderedSet(int capacity, @Nullable CollectionHost<E> host)
-
-
Method Detail
-
indexBitSet
@NotNull public java.util.BitSet indexBitSet(@NotNull java.lang.Iterable<? extends E> items)
-
differenceBitSet
@NotNull public java.util.BitSet differenceBitSet(@NotNull java.lang.Iterable<? extends E> items)
-
differenceBitSet
@NotNull public java.util.BitSet differenceBitSet(@NotNull java.util.Iterator<? extends E> items)
-
keyDifferenceBitSet
@NotNull public java.util.BitSet keyDifferenceBitSet(@NotNull java.lang.Iterable<? extends java.util.Map.Entry<? extends E,?>> items)
-
keyDifferenceBitSet
@NotNull public java.util.BitSet keyDifferenceBitSet(@NotNull java.util.Iterator<? extends java.util.Map.Entry<? extends E,?>> items)
-
valueDifferenceBitSet
@NotNull public java.util.BitSet valueDifferenceBitSet(@NotNull java.lang.Iterable<? extends java.util.Map.Entry<?,? extends E>> items)
-
valueDifferenceBitSet
@NotNull public java.util.BitSet valueDifferenceBitSet(@NotNull java.util.Iterator<? extends java.util.Map.Entry<?,? extends E>> items)
-
getModificationCount
public int getModificationCount()
-
ifNull
public static <T1> T1 ifNull(T1 o, T1 nullValue)
-
inHostUpdate
public boolean inHostUpdate()
-
indexOf
public int indexOf(@Nullable java.lang.Object element)
-
isValidIndex
public boolean isValidIndex(int index)
-
validateIndex
public void validateIndex(int index)
-
getValue
@Nullable public E getValue(int index)
-
getValueOrNull
@Nullable public E getValueOrNull(int index)
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(@Nullable java.lang.Object o)
-
getValueList
@NotNull public java.util.List<E> getValueList()
-
values
@NotNull public java.util.List<E> values()
-
setValueAt
public boolean setValueAt(int index, @Nullable E value, @Nullable java.lang.Object o)
-
isSparse
public boolean isSparse()
-
addNull
public void addNull()
-
addNulls
public void addNulls(int index)
-
indexIterator
@NotNull public ReversibleIterator<java.lang.Integer> indexIterator()
-
reversedIndexIterator
@NotNull public ReversibleIterator<java.lang.Integer> reversedIndexIterator()
-
indexIterable
@NotNull public ReversibleIterable<java.lang.Integer> indexIterable()
-
reversedIndexIterable
@NotNull public ReversibleIterable<java.lang.Integer> reversedIndexIterable()
-
iterator
@NotNull public ReversibleIndexedIterator<E> iterator()
-
reversedIterator
@NotNull public ReversibleIndexedIterator<E> reversedIterator()
-
iterable
@NotNull public ReversibleIterable<E> iterable()
-
reversedIterable
@NotNull public ReversibleIterable<E> reversedIterable()
-
toArray
@NotNull public java.lang.Object[] toArray()
-
toArray
@NotNull public <T> T[] toArray(@NotNull T[] array)
-
add
public boolean add(@Nullable E e)
-
add
public boolean add(@Nullable E e, @Nullable java.lang.Object o)
-
removeIndex
public boolean removeIndex(int index)
-
removeIndexHosted
public java.lang.Object removeIndexHosted(int index)
-
remove
public boolean remove(@Nullable java.lang.Object o)
-
removeHosted
@Nullable public java.lang.Object removeHosted(@Nullable java.lang.Object o)
-
containsAll
public boolean containsAll(@NotNull java.util.Collection<?> collection)
-
addAll
public boolean addAll(@NotNull java.util.Collection<? extends E> collection)
-
retainAll
public boolean retainAll(@NotNull java.util.Collection<?> collection)
-
removeAll
public boolean removeAll(@NotNull java.util.Collection<?> collection)
-
clear
public void clear()
-
equals
public boolean equals(java.lang.Object o)
-
hashCode
public int hashCode()
-
getValidIndices
@NotNull public java.util.BitSet getValidIndices()
-
-