java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
org.apache.jena.sparql.engine.join.ImmutableUniqueList<T>
- All Implemented Interfaces:
Iterable<T>
,Collection<T>
,List<T>
- Direct Known Subclasses:
JoinKey
An immutable list without duplicates.
For lists of size 5 or larger,
the
indexOf(Object)
method will on first use index the elements for faster access.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
The builder can emit a key every time build() is called and it can be continued to be used. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static <T> ImmutableUniqueList<T>
createUniqueList
(Class<T> itemClass, Collection<T> items) static <T> ImmutableUniqueList<T>
createUniqueList
(Class<T> itemClass, T[] items) boolean
get
(int i) int
int
length()
static <T> ImmutableUniqueList.Builder<T>
newUniqueListBuilder
(Class<T> itemClass) int
size()
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, hashCode, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Method Details
-
newUniqueListBuilder
-
createUniqueList
-
createUniqueList
-
size
public int size()- Specified by:
size
in interfaceCollection<T>
- Specified by:
size
in interfaceList<T>
- Specified by:
size
in classAbstractCollection<T>
-
length
public int length() -
get
-
contains
- Specified by:
contains
in interfaceCollection<T>
- Specified by:
contains
in interfaceList<T>
- Overrides:
contains
in classAbstractCollection<T>
-
indexOf
-
equals
- Specified by:
equals
in interfaceCollection<T>
- Specified by:
equals
in interfaceList<T>
- Overrides:
equals
in classAbstractList<T>
-