Class ViewVOIVector

All Implemented Interfaces:
Serializable, Cloneable, Iterable<VOI>, Collection<VOI>, List<VOI>, RandomAccess, SequencedCollection<VOI>
Direct Known Subclasses:
VOIVector

public class ViewVOIVector extends 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:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
  • Constructor Details

    • 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 Details

    • 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 class Vector<VOI>
      Parameters:
      o - index of the VOI
      Throws:
      IllegalArgumentException - for any argument o which is not an instance of gov.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 String buildName(String name)
      Builds a new voi name by incrementing the given name.
      Parameters:
      name - current name
      Returns:
      the new name
    • getUniqueID

      public int getUniqueID()