kea.programs.jPrimrose
Class TargetCollection

java.lang.Object
  extended by kea.programs.jPrimrose.TargetCollection

public class TargetCollection
extends java.lang.Object

Stores target objects.

Version:
2.17.
Author:
Kevin Ashelford.

Constructor Summary
TargetCollection()
          Creates a new instance of TargetCollection.
 
Method Summary
 void addTarget(Target target)
          Adds target to collection.
 int getNumberSelected()
          Returns number of selected targets within collection.
 Target[] getSelectedTargets()
          Returns array of all target objects that are selected.
 int getSize()
          Returns number of Target objects in collection.
 Target getTarget(int index)
          Returns target at position specified.
 Target getTarget(kea.database.Record record)
          Returns Target object corresponding to supplied Record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TargetCollection

public TargetCollection()
Creates a new instance of TargetCollection.

Method Detail

addTarget

public void addTarget(Target target)
Adds target to collection.

Parameters:
target - Target object to add.

getTarget

public Target getTarget(kea.database.Record record)
Returns Target object corresponding to supplied Record.

Parameters:
record - Record object of required Target.
Returns:
Target object.

getTarget

public Target getTarget(int index)
Returns target at position specified.

Parameters:
index - Index number of required target.
Returns:
Target object.

getSize

public int getSize()
Returns number of Target objects in collection.

Returns:
Size of collection.

getNumberSelected

public int getNumberSelected()
Returns number of selected targets within collection.

Returns:
Number selected.

getSelectedTargets

public Target[] getSelectedTargets()
Returns array of all target objects that are selected.

Returns:
Array of selected target objects.