|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.IlvGraphicVector
public class IlvGraphicVector
An IlvGraphicVector is an expandable array of graphic objects.
Note that the implementation is not synchronized. If multiple threads
access an IlvGraphicVector concurrently, and at least one of
the threads modifies the list structurally, it must be synchronized externally.
| Field Summary | |
|---|---|
protected int |
capacityIncrement
The size of the increment. |
protected int |
elementCount
The number of elements in the buffer. |
protected IlvGraphic[] |
elementData
The buffer in which elements are stored. |
| Constructor Summary | |
|---|---|
IlvGraphicVector()
Constructs an empty vector. |
|
IlvGraphicVector(int initialCapacity)
Constructs an empty vector with the specified storage capacity. |
|
IlvGraphicVector(int initialCapacity,
int capacityIncrement)
Constructs an empty vector with the specified storage capacity and the specified capacityIncrement. |
|
| Method Summary | |
|---|---|
void |
addElement(IlvGraphic obj)
Adds the specified object as the last element of the vector. |
int |
capacity()
Returns the current capacity of the vector. |
Object |
clone()
Clones this vector. |
boolean |
contains(IlvGraphic elem)
Returns true if the specified element is a value of the vector. |
void |
copyInto(IlvGraphic[] anArray)
Copies the elements of this vector into the specified array. |
IlvGraphic |
elementAt(int index)
Returns the element at the specified index. |
IlvGraphicEnumeration |
elements()
Returns an enumeration of the elements. |
void |
ensureCapacity(int minCapacity)
Ensures that the vector has at least the specified capacity. |
IlvGraphic |
firstElement()
Returns the first element of the sequence. |
int |
indexOf(IlvGraphic elem)
Searches for the specified element starting from the first position. |
int |
indexOf(IlvGraphic elem,
int index)
Searches for the specified element starting from the specified position. |
void |
insertElementAt(IlvGraphic obj,
int index)
Inserts the specified object as an element at the specified index. |
boolean |
isEmpty()
Returns true if the vector contains no values. |
IlvGraphic |
lastElement()
Returns the last element of the sequence. |
int |
lastIndexOf(IlvGraphic elem)
Searches backwards for the specified element, starting from the last position. |
int |
lastIndexOf(IlvGraphic elem,
int index)
Searches backwards for the specified element, starting from the specified position. |
void |
removeAllElements()
Removes all elements of the vector. |
boolean |
removeElement(IlvGraphic obj)
Removes the element from the vector. |
void |
removeElementAt(int index)
Deletes the element at the specified index. |
IlvGraphic |
setElementAt(IlvGraphic obj,
int index)
Sets the element at the specified index to be the specified object. |
void |
setSize(int newSize)
Sets the size of the vector. |
int |
size()
Returns the number of elements in the vector. |
String |
toString()
Converts the vector to a string. |
void |
trimToSize()
Optimizes the capacity of the vector. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected IlvGraphic[] elementData
protected int elementCount
protected int capacityIncrement
| Constructor Detail |
|---|
public IlvGraphicVector(int initialCapacity,
int capacityIncrement)
initialCapacity - the initial storage capacity of the vector.capacityIncrement - how much to increase the size of the element
by.public IlvGraphicVector(int initialCapacity)
initialCapacity - the initial storage capacity of the vector.public IlvGraphicVector()
| Method Detail |
|---|
public final void copyInto(IlvGraphic[] anArray)
anArray - the array which elements are copied into.public final void trimToSize()
public final void ensureCapacity(int minCapacity)
minCapacity - the desired minimum capacity.public final void setSize(int newSize)
newSize - the new vector size.public final int capacity()
public final int size()
public final boolean isEmpty()
public final IlvGraphicEnumeration elements()
public final boolean contains(IlvGraphic elem)
elem - the desired element.public final int indexOf(IlvGraphic elem)
elem - the desired element.
public final int indexOf(IlvGraphic elem,
int index)
elem - the desired element.index - the index where the search should be started.
public final int lastIndexOf(IlvGraphic elem)
elem - the desired element.
public final int lastIndexOf(IlvGraphic elem,
int index)
elem - the desired element.index - the index where the search should be started.
public final IlvGraphic elementAt(int index)
index - the index of the desired element.
ArrayIndexOutOfBoundsException - if
the index supplied was not valid.public final IlvGraphic firstElement()
NoSuchElementException - if the sequence is empty.public final IlvGraphic lastElement()
NoSuchElementException - if the sequence is empty.
public final IlvGraphic setElementAt(IlvGraphic obj,
int index)
obj - what the element is to be set to.index - the specified index.
ArrayIndexOutOfBoundsException - if the index was
not valid.public final void removeElementAt(int index)
index - the element to be removed.
ArrayIndexOutOfBoundsException - if the index was not valid.
public final void insertElementAt(IlvGraphic obj,
int index)
obj - the element to be inserted.index - where the new element should be inserted.
ArrayIndexOutOfBoundsException - if the index was not valid.public final void addElement(IlvGraphic obj)
obj - the element to be added.public final boolean removeElement(IlvGraphic obj)
obj - the element to be removed
public final void removeAllElements()
public Object clone()
clone in class Objectpublic final String toString()
toString in class Object
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||