Package com.yahoo.config
Class NodeVector<NODE>
java.lang.Object
com.yahoo.config.NodeVector<NODE>
- All Implemented Interfaces:
Iterable<NODE>
,Collection<NODE>
,List<NODE>
- Direct Known Subclasses:
InnerNodeVector
,LeafNodeVector
A NodeVector represents an array declared with '[]' in a config definition file.
It is a List that stores nodes with a given type. A given default node must
be given, and this node will be cloned as the NodeVector size are increased.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, Collection<? extends NODE> c) boolean
addAll
(Collection<? extends NODE> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) boolean
get
(int index) int
hashCode()
int
boolean
isEmpty()
iterator()
int
int
length()
Returns the number of elements in this NodeVector.listIterator
(int index) remove
(int index) boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
subList
(int fromIndex, int toIndex) Object[]
toArray()
<T> T[]
toArray
(T[] a) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
Field Details
-
vector
-
-
Constructor Details
-
NodeVector
public NodeVector()
-
-
Method Details
-
length
public int length()Returns the number of elements in this NodeVector. Alias for size().- Returns:
- the number of elements in this NodeVector.
-
add
-
add
-
addAll
-
addAll
-
clear
public void clear() -
remove
-
remove
-
removeAll
-
retainAll
-
set
-
contains
-
containsAll
- Specified by:
containsAll
in interfaceCollection<NODE>
- Specified by:
containsAll
in interfaceList<NODE>
-
equals
-
hashCode
public int hashCode() -
get
-
indexOf
-
isEmpty
public boolean isEmpty() -
iterator
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<NODE>
-
listIterator
- Specified by:
listIterator
in interfaceList<NODE>
-
listIterator
- Specified by:
listIterator
in interfaceList<NODE>
-
size
public int size() -
subList
-
toArray
-
toArray
public <T> T[] toArray(T[] a)
-