|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.util.SeqRangeCollector
Collect added integer values into ranges defined by specified rules (such as contiguous integers in a sequence, all integers of same value, etc). Call addItem() to add items to ranges. Call done() when done. Call getRanges() to get list of ranges (after first calling done()). Call reset() to begin anew.
Nested Class Summary | |
class |
SeqRangeCollector.Range
Class holding range. |
Field Summary | |
protected int |
emptyValue
Value defining integer that is not part of the range. |
protected int |
lastItemInCurrentRange
Last item in current range. |
static int |
RANGE_BREAK_HEX_BOUNDARY
Range Break: as specified by RangeType and at 0xff boundaries. |
static int |
RANGE_BREAK_NORMAL
Range Break: as specified by RangeType |
static int |
RANGE_INCREASING_BY_1
Range: contiguous integers, each member one greater than the previous |
static int |
RANGE_SAME_VALUE
Range: all integers in a row that have same value. |
protected int |
rangeBreak
Extra rule for breaking a range |
protected Vector |
ranges
List of ranges found so far. |
protected int |
rangeType
Type of range to look for |
protected int |
sizeOfCurrentRange
Size of current range. |
protected int |
startOfCurrentRange
Start of current range. |
Constructor Summary | |
SeqRangeCollector()
Simple constructor. |
Method Summary | |
void |
addItem(int item)
Add the given integer to a range as per the rules defined in the RangeType property. |
void |
done()
Finished adding items. |
protected void |
flushRange(int item)
End current range, add it to the list of ranges, and start new range with given item. |
int |
getEmptyValue()
Set the EmptyValue property, which is used to determine the integer value used as an internal delimiter for ranges. |
int |
getRangeBreak()
Set the RangeBreak property, which determines the type of range breaks that will be forced in addition to the rule specified in RangeType; Currently, this value must be one of RANGE_BREAK_NORMAL or RANGE_BREAK_HEX_BOUNDARY. |
List |
getRanges()
Get list of ranges created from integer input. |
int |
getRangeType()
Get the RangeType property, which determines the type of range that is being tracked. |
void |
reset()
Clear range list and reset range tracking variables for starting anew. |
void |
setEmptyValue(int emptyValue)
Set the EmptyValue property, which is used to determine the integer value used as an internal delimiter for ranges. |
void |
setRangeBreak(int rangeBreak)
Set the RangeBreak property, which determines the type of range breaks that will be forced in addition to the rule specified in RangeType; Currently, this value must be one of RANGE_BREAK_NORMAL or RANGE_BREAK_HEX_BOUNDARY. |
void |
setRangeType(int rangeType)
Set the RangeType property, which determines the type of range that is being tracked. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int RANGE_INCREASING_BY_1
public static final int RANGE_SAME_VALUE
public static final int RANGE_BREAK_NORMAL
public static final int RANGE_BREAK_HEX_BOUNDARY
protected int rangeType
protected int rangeBreak
protected int emptyValue
protected int startOfCurrentRange
protected int lastItemInCurrentRange
protected int sizeOfCurrentRange
protected Vector ranges
Constructor Detail |
public SeqRangeCollector()
Method Detail |
public void reset()
public void addItem(int item)
public void done()
protected void flushRange(int item)
public List getRanges()
public void setRangeType(int rangeType)
public int getRangeType()
public void setRangeBreak(int rangeBreak)
public int getRangeBreak()
public void setEmptyValue(int emptyValue)
public int getEmptyValue()
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |