Class Selection

java.lang.Object
  |
  +--Selection

public class Selection
extends java.lang.Object
implements Constants, java.io.Serializable

Selection implements selections which are given to tabdataset. Column's and TabDataSet's selection-features should be moved into this class in the future.

See Also:
Serialized Form

Fields inherited from interface Constants
DEBUG, T_BOOLEAN, T_CLASS, T_DOUBLE, T_INTEGER, T_SELECT, T_UNSELECT
 
Constructor Summary
Selection(int attrno, double min, double max, boolean inc)
           
Selection(int attrno1, double min1, double max1, int attrno2, double min2, double max2, boolean inc)
          Creates a new 2D-selection.
Selection(int attrno1, double min1, double max1, int attrno2, int min2, int max2, boolean inc)
          Creates a new 2D-selection.
Selection(int attrno1, double min1, double max1, int attrno2, long min2, long max2, boolean inc)
          Creates a new 2D-selection.
Selection(int attrno, int min, int max, boolean inc)
           
Selection(int attrno1, int min1, int max1, int attrno2, double min2, double max2, boolean inc)
          Creates a new 2D-selection.
Selection(int attrno1, int min1, int max1, int attrno2, int min2, int max2, boolean inc)
          Creates a new 2D-selection.
Selection(int attrno1, int min1, int max1, int attrno2, long min2, long max2, boolean inc)
          Creates a new 2D-selection.
Selection(int attrno, long min, long max, boolean inc)
           
Selection(int attrno1, long min1, long max1, int attrno2, double min2, double max2, boolean inc)
          Creates a new 2D-selection.
Selection(int attrno1, long min1, long max1, int attrno2, int min2, int max2, boolean inc)
          Creates a new 2D-selection.
Selection(int attrno1, long min1, long max1, int attrno2, long min2, long max2, boolean inc)
          Creates a new 2D-selection.
Selection(java.util.Vector selVec)
          Creates a new Selection and inserts the given selVec into the class structures.
 
Method Summary
 int[] getAttrIndexes()
           
 int getMaxClass1()
          Returns the upper limit of the first attribute.
 int getMaxClass2()
          Returns the upper limit of the second attribute.
 double getMaxDouble1()
          Returns the upper limit of the first attribute.
 double getMaxDouble2()
          Returns the upper limit of the second attribute.
 long getMaxLong1()
          Returns the upper limit of the first attribute.
 long getMaxLong2()
          Returns the upper limit of the second attribute.
 int getMinClass1()
          Returns the lower limit of the first attribute.
 int getMinClass2()
          Returns the lower limit of the second attribute.
 double getMinDouble1()
          Returns the lower limit of the first attribute.
 double getMinDouble2()
          Returns the lower limit of the second attribute.
 long getMinLong1()
          Returns the lower limit of the first attribute.
 long getMinLong2()
          Returns the lower limit of the second attribute.
static int getSelectionCount()
          Returns the number of the 2D-selections made.
static java.util.Vector getSelectionVector()
          Returns the selection Vector for saving.
 boolean increments()
          Returns a boolean telling whether this selection should be incremented or not.
static void reset()
          Clears the selections.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Selection

public Selection(java.util.Vector selVec)
Creates a new Selection and inserts the given selVec into the class structures. This is only used when selections are loaded from a file. Constructor is currently called only from TabDataSet.

Selection

public Selection(int attrno,
                 long min,
                 long max,
                 boolean inc)

Selection

public Selection(int attrno,
                 double min,
                 double max,
                 boolean inc)

Selection

public Selection(int attrno,
                 int min,
                 int max,
                 boolean inc)

Selection

public Selection(int attrno1,
                 long min1,
                 long max1,
                 int attrno2,
                 long min2,
                 long max2,
                 boolean inc)
Creates a new 2D-selection.
Parameters:
attrno1 - - First attribute.
min1 - - First attribute's min value.
max1 - - First attribute's max value.
attrno2 - - Second attribute.
min2 - - Second attribute's min value.
max2 - - Second attribute's max value.

Selection

public Selection(int attrno1,
                 long min1,
                 long max1,
                 int attrno2,
                 double min2,
                 double max2,
                 boolean inc)
Creates a new 2D-selection.
Parameters:
attrno1 - - First attribute.
min1 - - First attribute's min value.
max1 - - First attribute's max value.
attrno2 - - Second attribute.
min2 - - Second attribute's min value.
max2 - - Second attribute's max value.

Selection

public Selection(int attrno1,
                 long min1,
                 long max1,
                 int attrno2,
                 int min2,
                 int max2,
                 boolean inc)
Creates a new 2D-selection.
Parameters:
attrno1 - - First attribute.
min1 - - First attribute's min value.
max1 - - First attribute's max value.
attrno2 - - Second attribute.
min2 - - Second attribute's min value.
max2 - - Second attribute's max value.

Selection

public Selection(int attrno1,
                 double min1,
                 double max1,
                 int attrno2,
                 double min2,
                 double max2,
                 boolean inc)
Creates a new 2D-selection.
Parameters:
attrno1 - - First attribute.
min1 - - First attribute's min value.
max1 - - First attribute's max value.
attrno2 - - Second attribute.
min2 - - Second attribute's min value.
max2 - - Second attribute's max value.

Selection

public Selection(int attrno1,
                 double min1,
                 double max1,
                 int attrno2,
                 long min2,
                 long max2,
                 boolean inc)
Creates a new 2D-selection.
Parameters:
attrno1 - - First attribute.
min1 - - First attribute's min value.
max1 - - First attribute's max value.
attrno2 - - Second attribute.
min2 - - Second attribute's min value.
max2 - - Second attribute's max value.

Selection

public Selection(int attrno1,
                 double min1,
                 double max1,
                 int attrno2,
                 int min2,
                 int max2,
                 boolean inc)
Creates a new 2D-selection.
Parameters:
attrno1 - - First attribute.
min1 - - First attribute's min value.
max1 - - First attribute's max value.
attrno2 - - Second attribute.
min2 - - Second attribute's min value.
max2 - - Second attribute's max value.

Selection

public Selection(int attrno1,
                 int min1,
                 int max1,
                 int attrno2,
                 int min2,
                 int max2,
                 boolean inc)
Creates a new 2D-selection.
Parameters:
attrno1 - - First attribute.
min1 - - First attribute's min value.
max1 - - First attribute's max value.
attrno2 - - Second attribute.
min2 - - Second attribute's min value.
max2 - - Second attribute's max value.

Selection

public Selection(int attrno1,
                 int min1,
                 int max1,
                 int attrno2,
                 long min2,
                 long max2,
                 boolean inc)
Creates a new 2D-selection.
Parameters:
attrno1 - - First attribute.
min1 - - First attribute's min value.
max1 - - First attribute's max value.
attrno2 - - Second attribute.
min2 - - Second attribute's min value.
max2 - - Second attribute's max value.

Selection

public Selection(int attrno1,
                 int min1,
                 int max1,
                 int attrno2,
                 double min2,
                 double max2,
                 boolean inc)
Creates a new 2D-selection.
Parameters:
attrno1 - - First attribute.
min1 - - First attribute's min value.
max1 - - First attribute's max value.
attrno2 - - Second attribute.
min2 - - Second attribute's min value.
max2 - - Second attribute's max value.
Method Detail

reset

public static void reset()
Clears the selections.

getSelectionCount

public static int getSelectionCount()
Returns the number of the 2D-selections made.
Returns:
The number of the 2D-selections made.

getSelectionVector

public static java.util.Vector getSelectionVector()
Returns the selection Vector for saving.
Returns:
the selection Vector.

getAttrIndexes

public int[] getAttrIndexes()

increments

public boolean increments()
Returns a boolean telling whether this selection should be incremented or not.
Returns:
boolean value telling whether this selection should be incremented or not.

getMinLong1

public long getMinLong1()
Returns the lower limit of the first attribute.
Returns:
lower limit of the first attribute.

getMaxLong1

public long getMaxLong1()
Returns the upper limit of the first attribute.
Returns:
upper limit of the first attribute.

getMinLong2

public long getMinLong2()
Returns the lower limit of the second attribute.
Returns:
lower limit of the second attribute.

getMaxLong2

public long getMaxLong2()
Returns the upper limit of the second attribute.
Returns:
upper limit of the second attribute.

getMinClass1

public int getMinClass1()
Returns the lower limit of the first attribute.
Returns:
lower limit of the first attribute.

getMaxClass1

public int getMaxClass1()
Returns the upper limit of the first attribute.
Returns:
upper limit of the first attribute.

getMinClass2

public int getMinClass2()
Returns the lower limit of the second attribute.
Returns:
lower limit of the second attribute.

getMaxClass2

public int getMaxClass2()
Returns the upper limit of the second attribute.
Returns:
upper limit of the second attribute.

getMinDouble1

public double getMinDouble1()
Returns the lower limit of the first attribute.
Returns:
lower limit of the first attribute.

getMaxDouble1

public double getMaxDouble1()
Returns the upper limit of the first attribute.
Returns:
upper limit of the first attribute.

getMinDouble2

public double getMinDouble2()
Returns the lower limit of the second attribute.
Returns:
lower limit of the second attribute.

getMaxDouble2

public double getMaxDouble2()
Returns the upper limit of the second attribute.
Returns:
upper limit of the second attribute.