V - protected static class Array.Values<V> extends Array<V>
Array.ArrayState, Array.Empty<V>, Array.References<V>, Array.Values<V>| Modifier and Type | Method and Description |
|---|---|
void |
checkNull(V value) |
boolean |
contains(V value)
Test if collection contains value.
|
int |
find(V value) |
V |
get(int i) |
protected Array.ArrayState |
getNext(int index,
Stack<Array.ArrayState> stack) |
protected Array.ArrayState |
getPrev(int index,
Stack<Array.ArrayState> stack) |
boolean |
isEmpty()
Test if empty.
|
Iterator<V> |
iterator()
Get the elements in order.
|
Iterator<V> |
reverseIterator()
Get the elements in reverse order.
|
boolean |
reverseVisit(ConditionalVisitor<V> visitor)
Visit all elements in reverse order until
visitor.visit() returns true; |
void |
reverseVisit(Visitor<V> visitor)
Visit all elements in reverse order.
|
Array<V> |
set(int i,
V value) |
int |
size()
Get the number of elements in the collection.
|
boolean |
visit(ConditionalVisitor<V> visitor)
Visit all elements in order until
visitor.visit() returns true; |
void |
visit(Visitor<V> visitor)
Visit all elements in order.
|
protected Array.ArrayState getNext(int index, Stack<Array.ArrayState> stack)
protected Array.ArrayState getPrev(int index, Stack<Array.ArrayState> stack)
public V get(int i)
public void checkNull(V value)
public int find(V value)
public boolean isEmpty()
AccessisEmpty() is guaranteed to be an O(1)
operation; it should always be used in preference to
size() == 0, as the latter may have cost up to O(n);public int size()
Accesssize() may have cost O(1), O(log(n) up
to O(n).public boolean contains(V value)
Accesspublic Iterator<V> iterator()
Accesspublic Iterator<V> reverseIterator()
Accesspublic void visit(Visitor<V> visitor)
Accesspublic boolean visit(ConditionalVisitor<V> visitor)
Accessvisitor.visit() returns true;visitor.visit() returned true;
otherwise falsepublic void reverseVisit(Visitor<V> visitor)
Accesspublic boolean reverseVisit(ConditionalVisitor<V> visitor)
Accessvisitor.visit() returns true;visitor.visit() returned true;
otherwise falseCopyright © 2015. All rights reserved.