Package gov.nih.mipav.view
Class ViewVOIVector
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.Vector<VOI>
-
- gov.nih.mipav.view.ViewVOIVector
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<VOI>
,java.util.Collection<VOI>
,java.util.List<VOI>
,java.util.RandomAccess
- Direct Known Subclasses:
VOIVector
public class ViewVOIVector extends java.util.Vector<VOI>
A simple class that extends Vector mostly to clean-up syntax access to VOI info. in ViewComponentEditImage((VOI)(VOIs.elementAt(i))).isActive()
would be a good example can be re-written as as:VOIs.VOIAt(i).isActive()
- Version:
- Feb 2, 1997
- Author:
- Matthew J. McAuliffe, Ph.D.
$Logfile: /mipav/src/gov/nih/mipav/view/ViewVOIVector.java $ $Revision: 10 $ $Date: 3/31/03 3:57p $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
Use serialVersionUID for interoperability.
-
Constructor Summary
Constructors Constructor Description ViewVOIVector()
Constructs an empty vector so that its internal data array has size 10 and its standard capacity increment is zero.ViewVOIVector(int initialsize)
Constructs an empty vector with the specified initial capacity and with its capacity increment equal to zero.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addElement(VOI newVOI)
Override the Vector method to ensure that object is a voi, and that the new voi's name is unique.protected java.lang.String
buildName(java.lang.String name)
Builds a new voi name by incrementing the given name.int
getUniqueID()
VOI
VOIAt(int i)
Returns the VOI at the index.-
Methods inherited from class java.util.Vector
add, add, addAll, addAll, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSize
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ViewVOIVector
public ViewVOIVector()
Constructs an empty vector so that its internal data array has size 10 and its standard capacity increment is zero.Copied from the definition of
java.util.Vector
-
ViewVOIVector
public ViewVOIVector(int initialsize)
Constructs an empty vector with the specified initial capacity and with its capacity increment equal to zero.- Parameters:
initialsize
- initial capacity of the vector
-
-
Method Detail
-
addElement
public void addElement(VOI newVOI)
Override the Vector method to ensure that object is a voi, and that the new voi's name is unique.- Overrides:
addElement
in classjava.util.Vector<VOI>
- Parameters:
o
- index of the VOI- Throws:
java.lang.IllegalArgumentException
- for any argumento
which is not an instance ofgov.nih.mipav.model.structures.VOI
-
VOIAt
public final VOI VOIAt(int i)
Returns the VOI at the index.- Parameters:
i
- index of the VOI- Returns:
- the VOI at the index
-
buildName
protected java.lang.String buildName(java.lang.String name)
Builds a new voi name by incrementing the given name.- Parameters:
name
- current name- Returns:
- the new name
-
getUniqueID
public int getUniqueID()
-
-