|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.util.IntegerRange
public class IntegerRange
A IntegerRange is an implementation of IntegerRangeInterface. It stores an integer value between a range of integers, with a value for the default increment.
Name | blockIncrement |
Type | int |
Default value | 10 |
Short Description | blockIncrement amount |
Description | Amount by which the value changes for block increments/decrements. |
Read method | int getBlockIncrement() |
Write method | void setBlockIncrement(int) |
Linkable | true |
Compare value | true |
Persist | true |
FieldName | blockIncrement |
Constrained | false |
Property editor class | |
Expert | false |
Hidden | false |
Name | maximum |
Default value | 100 |
Short description | maximum value |
Description | Maximum amount of range value. |
Read method | int getMaximum() |
Write method | void setMaximum(int) |
Bound | true |
Linkable | true |
Compare value | true |
Persist | true |
FieldName | maximum |
Constrained | false |
Property editor class | |
Expert | false |
Hidden | false |
Name | minimum |
Default value | |
Short description | minimum value |
Description | Minimum amount of range value. |
Read method | int getMinimum() |
Write method | void setMinimum(int) |
Bound | true |
Linkable | true |
Compare value | true |
Persist | true |
FieldName | minimum |
Constrained | false |
Property editor class | |
Expert | false |
Hidden | false |
Name | unitIncrement |
Default value | 1 |
Short description | unit increment |
Description | amount the value increments for unit (single) increments/decrements |
Read method | int getUnitIncrement() |
Write method | void setunitIncrement(int) |
Bound | true |
Linkable | true |
Compare value | true |
Persist | true |
FieldName | unitIncrement |
Constrained | false |
Property editor class | |
Expert | false |
Hidden | false |
Name | value |
Default value | 1 |
Short description | current value |
Description | Value of range |
Read method | int getValue() |
Write method | void setValue(int) |
Bound | true |
Linkable | true |
Compare value | true |
Persist | true |
FieldName | propertyFieldName |
Constrained | false |
Property editor class | |
Expert | false |
Hidden | false |
IntegerRangeInterface
,
Serialized FormConstructor Summary | |
---|---|
IntegerRange()
Deprecated. Default constructor. |
|
IntegerRange(int value,
int min,
int max,
int unit,
int block)
Deprecated. Creates an integer range with the specified value, unitIncrement, blockIncrement, minimum, and maximum amounts. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Deprecated. Clone an IntegerRange object |
boolean |
equals(IntegerRange otherRange)
Deprecated. Compare to an IntegerRange object. |
boolean |
equals(java.lang.Object object)
Deprecated. Compare to an object. |
int |
getBlockIncrement()
Deprecated. Gets the block value increment for the adjustable object. |
java.lang.Number |
getBlockIncrementNumber()
Deprecated. Gets the block value increment for the adjustable object. |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
Deprecated. |
int |
getMaximum()
Deprecated. Gets the maximum value of the adjustable object. |
java.lang.Number |
getMaximumNumber()
Deprecated. Gets the maximum value of the integer range. |
int |
getMinimum()
Deprecated. Gets the minimum value of the adjustable object. |
java.lang.Number |
getMinimumNumber()
Deprecated. Gets the minimum value of the integer range. |
java.lang.Number |
getNumberValue()
Deprecated. Gets the unit value increment for the adjustable object. |
int |
getUnitIncrement()
Deprecated. Gets the unit value increment for the adjustable object. |
java.lang.Number |
getUnitIncrementNumber()
Deprecated. Gets the unit value increment for the adjustable object. |
int |
getValue()
Deprecated. Gets the current value of the adjustable object. |
java.lang.Number |
incrementBy(int increment,
int incrementType)
Deprecated. Increment, by unit or block increment amount, the current value by the specified number of increments. |
void |
setBlockIncrement(int block)
Deprecated. Sets the block value increment for the adjustable object. |
void |
setBlockIncrementNumber(java.lang.Number block)
Deprecated. Sets the block value increment for the adjustable object. |
void |
setDefaultValues()
Deprecated. Set the default values of all the attributes |
void |
setMaximum(int max)
Deprecated. Sets the maximum value of the adjustable object. |
void |
setMaximumNumber(java.lang.Number max)
Deprecated. Sets the maximum value of the adjustable object. |
void |
setMinimum(int min)
Deprecated. Sets the minimum value of the adjustable object. |
void |
setMinimumNumber(java.lang.Number min)
Deprecated. Sets the minimum value of the adjustable object. |
void |
setNumberValue(java.lang.Number newValue)
Deprecated. Sets the current value of the adjustable object. |
void |
setNumberValues(java.lang.Number newValue,
java.lang.Number min,
java.lang.Number max)
Deprecated. Set the value, minimum and maximum at the same time. |
void |
setNumberValues(java.lang.Number newValue,
java.lang.Number min,
java.lang.Number max,
java.lang.Number unit,
java.lang.Number block)
Deprecated. Set the value, minimum and maximum at the same time. |
void |
setUnitIncrement(int unit)
Deprecated. Sets the unit value increment for the adjustable object. |
void |
setUnitIncrementNumber(java.lang.Number unit)
Deprecated. Sets the unit value increment for the adjustable object. |
void |
setValue(int newValue)
Deprecated. Sets the current value of the adjustable object. |
void |
setValues(int value,
int min,
int max)
Deprecated. Set the value, minimum and maximum at the same time. |
void |
setValues(int value,
int min,
int max,
int unit,
int block)
Deprecated. Set the value, minimum and maximum at the same time. |
java.lang.String |
toString()
Deprecated. Return a string representation of an IntegerRange |
Constructor Detail |
---|
public IntegerRange()
public IntegerRange(int value, int min, int max, int unit, int block)
value
- initial value. If value < min it is set to min;
if value > max, it is set to maxmin
- minimum valuemax
- maximum valueunit
- unit incrementblock
- block increment
java.lang.IllegalArgumentException
- if (min > max), (unit < 0),
(block < 0), (unit > range) or (block > range),
where range = (max - min)Method Detail |
---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- another object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface com.sas.PublicClonable
clone
in class com.sas.Component
java.lang.CloneNotSupportedException
- if there is a clone exception.public boolean equals(IntegerRange otherRange)
otherRange
- another IntegerRange object
public java.lang.String toString()
toString
in class java.lang.Object
public void setDefaultValues()
setDefaultValues
in interface com.sas.ComponentInterface
setDefaultValues
in class com.sas.Component
ComponentInterface.setDefaultValues()
public int getMaximum()
getMaximum
in interface IntegerRangeInterface
public int getMinimum()
getMinimum
in interface IntegerRangeInterface
public int getBlockIncrement()
getBlockIncrement
in interface IntegerRangeInterface
public int getUnitIncrement()
getUnitIncrement
in interface IntegerRangeInterface
public int getValue()
getValue
in interface IntegerRangeInterface
public java.lang.Number incrementBy(int increment, int incrementType)
incrementBy
in interface com.sas.models.IncrementInterface
incrementBy
in interface IntegerRangeInterface
increment
- The number of incrementType(unit or block) amounts to increment
the current value(can be negative to decrement value).incrementType
- UNIT to increment by the unit amount;
BLOCK to increment by the block amount
public void setMaximum(int max)
setMaximum
in interface IntegerRangeInterface
max
- the maximum value
java.lang.IllegalArgumentException
- if max < minimumpublic void setMinimum(int min)
setMinimum
in interface IntegerRangeInterface
min
- the minimum value
java.lang.IllegalArgumentException
- if min > maximumpublic void setBlockIncrement(int block)
setBlockIncrement
in interface IntegerRangeInterface
block
- the block increment
java.lang.IllegalArgumentException
- if (block < 0) or (block > (maximum - minimum))public void setUnitIncrement(int unit)
setUnitIncrement
in interface IntegerRangeInterface
unit
- the unit increment
java.lang.IllegalArgumentException
- if (unit < 0) or (unit > (maximum - minimum))public void setValue(int newValue)
setValue
in interface IntegerRangeInterface
value
- the current valuepublic void setValues(int value, int min, int max)
setValues
in interface IntegerRangeInterface
value
- the new valuemin
- the new minimummax
- the new maximum
java.lang.IllegalArgumentException
- if (min > max), (unit < 0),
(block < 0), (unit > range) or (block > range),
where range = (max - min)public void setValues(int value, int min, int max, int unit, int block)
setValues
in interface IntegerRangeInterface
value
- the new valuemin
- the new minimummax
- the new maximumunit
- the new unit incrementblock
- the new block increment
java.lang.IllegalArgumentException
- if (min > max), (unit < 0),
(block < 0), (unit > range) or (block > range),
where range = (max - min)public java.lang.Number getMaximumNumber()
getMaximumNumber
in interface com.sas.models.RangeInterface
public java.lang.Number getMinimumNumber()
getMinimumNumber
in interface com.sas.models.RangeInterface
public java.lang.Number getBlockIncrementNumber()
getBlockIncrementNumber
in interface com.sas.models.IncrementInterface
public java.lang.Number getUnitIncrementNumber()
getUnitIncrementNumber
in interface com.sas.models.IncrementInterface
public java.lang.Number getNumberValue()
getNumberValue
in interface com.sas.models.BoundedNumberInterface
public void setMaximumNumber(java.lang.Number max)
setMaximumNumber
in interface com.sas.models.RangeInterface
max
- the maximum value
java.lang.IllegalArgumentException
- if max < minimumpublic void setMinimumNumber(java.lang.Number min)
setMinimumNumber
in interface com.sas.models.RangeInterface
min
- the minimum value
java.lang.IllegalArgumentException
- if min > maximumpublic void setBlockIncrementNumber(java.lang.Number block)
setBlockIncrementNumber
in interface com.sas.models.IncrementInterface
block
- the block increment
java.lang.IllegalArgumentException
- if (block < 0) or (block > (maximum - minimum))public void setUnitIncrementNumber(java.lang.Number unit)
setUnitIncrementNumber
in interface com.sas.models.IncrementInterface
unit
- the unit increment
java.lang.IllegalArgumentException
- if (unit < 0) or (unit > (maximum - minimum))public void setNumberValue(java.lang.Number newValue)
setNumberValue
in interface com.sas.models.BoundedNumberInterface
value
- the current valuepublic void setNumberValues(java.lang.Number newValue, java.lang.Number min, java.lang.Number max)
setNumberValues
in interface com.sas.models.BoundedNumberInterface
value
- the new valuemin
- the new minimummax
- the new maximum
java.lang.IllegalArgumentException
- if (min > max), (unit < 0),
(block < 0), (unit > range) or (block > range),
where range = (max - min)public void setNumberValues(java.lang.Number newValue, java.lang.Number min, java.lang.Number max, java.lang.Number unit, java.lang.Number block)
setNumberValues
in interface com.sas.models.BoundedNumberInterface
value
- the new valuemin
- the new minimummax
- the new maximumunit
- the new unit incrementblock
- the new block increment
java.lang.IllegalArgumentException
- if (min > max), (unit < 0),
(block < 0), (unit > range) or (block > range),
where range = (max - min)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |