gov.nist.antd.optical.util
Class PtPBundle

java.lang.Object
  |
  +--gov.nist.antd.optical.util.PtPBundle

public class PtPBundle
extends java.lang.Object

This class is used to bundle some elements (used for link and lambda). There cannot have twice the same object in the bundle.

 This class was developed at the National Institute of Standards and
 Technology by employees of the Federal Government in the course of
 their official duties. Pursuant to title 17 Section 105 of the United
 States Code this software is not subject to copyright protection and
 is in the public domain.
 NIST assumes no responsibility whatsoever for its use by other parties,
 and makes no guarantees, expressed or implied, about its quality,
 reliability, or any other characteristic.
 
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.

Author:
borchert
, rouil

Field Summary
private  java.util.Vector elements
          List of links.
 
Constructor Summary
PtPBundle()
          Default constructor
PtPBundle(java.util.Vector elem)
          Create a PtPBundle from the give vector
 
Method Summary
 void addElement(java.lang.Object element)
          Add a link in the vector.
 java.lang.Object[] getElements()
          Get the array of links of this object
 void removeElement(java.lang.Object element)
          Remove a link from the vector
 int size()
          Returns the number of elements used in the bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elements

private java.util.Vector elements
List of links. Must connect the same nodes

Constructor Detail

PtPBundle

public PtPBundle()
Default constructor


PtPBundle

public PtPBundle(java.util.Vector elem)
Create a PtPBundle from the give vector

Parameters:
elem - The vector of elements to bundle
Method Detail

getElements

public java.lang.Object[] getElements()
Get the array of links of this object

Returns:
The array of links

addElement

public void addElement(java.lang.Object element)
                throws IllegalDataException
Add a link in the vector. The link must connect the same nodes

Parameters:
element - The element to insert
Throws:
if - the type is not homogene to the elements of the vector
IllegalDataException

removeElement

public void removeElement(java.lang.Object element)
Remove a link from the vector

Parameters:
element - The element to remove

size

public int size()
Returns the number of elements used in the bundle.

Returns:
the number of elements in the bundle.
Since:
1.1