com.ibm.ulc.util
Class UlcRange

java.lang.Object
  |
  +--com.ibm.ulc.util.UlcRange

public class UlcRange
extends java.lang.Object

UlcRange is a class used to denote selection ranges. Primary use is to collect a list of selected indices into a list of continuous ranges to optimise the message traffic to the UI.


Field Summary
 int fEndIndex
          The int end index
 int fStartIndex
          The int start index
 
Constructor Summary
UlcRange(java.lang.Integer start, java.lang.Integer end)
          Return an instance of a UlcRange initialized with the start and end index specified.
UlcRange(int start, int end)
          Return an instance of a UlcRange initialized with the start and end index specified.
 
Method Summary
static java.util.Vector createFromIntArray(int[] source)
          Return a vector of UlcRange instances created from a vector of indices.
static java.util.Vector createFromVector(java.util.Vector source)
          Return a vector of UlcRange instances created from a vector of indices.
 int[] toArray()
          Create and answer an array containing the receiver as it's elements.
 java.lang.String toString()
           
 java.util.Vector toVector()
          Create and answer an array containing the receiver as it's elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fStartIndex

public int fStartIndex
The int start index

fEndIndex

public int fEndIndex
The int end index
Constructor Detail

UlcRange

public UlcRange(int start,
                int end)
Return an instance of a UlcRange initialized with the start and end index specified.

UlcRange

public UlcRange(java.lang.Integer start,
                java.lang.Integer end)
Return an instance of a UlcRange initialized with the start and end index specified.
Method Detail

createFromIntArray

public static java.util.Vector createFromIntArray(int[] source)
Return a vector of UlcRange instances created from a vector of indices. The vector of indices is not assumed to be in sorted order.

createFromVector

public static java.util.Vector createFromVector(java.util.Vector source)
Return a vector of UlcRange instances created from a vector of indices. The vector of indices is not assumed to be in sorted order.

toArray

public int[] toArray()
Create and answer an array containing the receiver as it's elements.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toVector

public java.util.Vector toVector()
Create and answer an array containing the receiver as it's elements.