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
public abstract class NodeVector<NODE> extends Object implements List<NODE>
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
Nested Classes Modifier and Type Class Description static class
NodeVector.ReadOnlyException
-
Constructor Summary
Constructors Constructor Description NodeVector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, NODE element)
boolean
add(NODE o)
boolean
addAll(int index, Collection<? extends NODE> c)
boolean
addAll(Collection<? extends NODE> c)
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection<?> c)
boolean
equals(Object o)
NODE
get(int index)
int
hashCode()
int
indexOf(Object o)
boolean
isEmpty()
Iterator<NODE>
iterator()
int
lastIndexOf(Object o)
int
length()
Returns the number of elements in this NodeVector.ListIterator<NODE>
listIterator()
ListIterator<NODE>
listIterator(int index)
NODE
remove(int index)
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
boolean
retainAll(Collection<?> c)
NODE
set(int index, NODE element)
int
size()
List<NODE>
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
-
-
-
-
Method Detail
-
length
public int length()
Returns the number of elements in this NodeVector. Alias for size().- Returns:
- the number of elements in this NodeVector.
-
add
public boolean add(NODE o)
-
addAll
public boolean addAll(Collection<? extends NODE> c)
-
addAll
public boolean addAll(int index, Collection<? extends NODE> c)
-
clear
public void clear()
-
remove
public boolean remove(Object o)
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
contains
public boolean contains(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<NODE>
- Specified by:
containsAll
in interfaceList<NODE>
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
isEmpty
public boolean isEmpty()
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf
in interfaceList<NODE>
-
listIterator
public ListIterator<NODE> listIterator()
- Specified by:
listIterator
in interfaceList<NODE>
-
listIterator
public ListIterator<NODE> listIterator(int index)
- Specified by:
listIterator
in interfaceList<NODE>
-
size
public int size()
-
toArray
public Object[] toArray()
-
-