Module jonix.common
Package com.tectonica.jonix.common
Class ListOfOnixElement<E extends OnixElement<V>,V>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
com.tectonica.jonix.common.ListOfOnixElement<E,V>
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<E>
,Collection<E>
,List<E>
,RandomAccess
- Direct Known Subclasses:
ListOfOnixCodelist
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <X extends OnixElement<Y>,
Y>
ListOfOnixElement<X,Y> empty()
first()
values()
returns a list of the values stored within the elements of this list (as opposed to the elements themselves, each of which also contains attributes, which are usually not interesting)<C extends Collection<V>>
CvaluesInto
(C collection) stores into a givenCollection
the values stored within the elements of this list (as opposed to the elements themselves, each of which also contains attributes, which are usually not interesting)Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
containsAll
-
Constructor Details
-
ListOfOnixElement
public ListOfOnixElement()
-
-
Method Details
-
values
returns a list of the values stored within the elements of this list (as opposed to the elements themselves, each of which also contains attributes, which are usually not interesting)- Returns:
- a non-null, possibly empty, list of the values
-
valuesInto
stores into a givenCollection
the values stored within the elements of this list (as opposed to the elements themselves, each of which also contains attributes, which are usually not interesting)- Returns:
- the same passed collection, after being populated
-
first
- Returns:
- an
Optional
of the firstOnixElement
listed, if any. SinceOnixElement
contains avalue
and some (less-interesting) attributes, a more typical API isfirstValue()
.
-
firstValue
- Returns:
- an
Optional
of thevalue
in the firstOnixElement
listed, if any
-
firstValueOrNull
- Returns:
- the
value
in the firstOnixElement
listed, ornull
it the none is listed
-
empty
-