com.sas.util
Class IntegerRange

com.sas.util.IntegerRange
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.ComponentInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, com.sas.models.BoundedNumberInterface, com.sas.models.IncrementInterface, com.sas.models.RangeInterface, com.sas.PublicClonable, IntegerRangeInterface, com.sas.ViewInterface, MultipleValueEventSourceInterface, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.lang.Cloneable, java.util.EventListener

Deprecated. Use com.sas.models.BoundedLong

public class IntegerRange
implements IntegerRangeInterface, com.sas.PublicClonable, com.sas.models.BoundedNumberInterface

A IntegerRange is an implementation of IntegerRangeInterface. It stores an integer value between a range of integers, with a value for the default increment. Properties

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

See Also:
IntegerRangeInterface, Serialized Form

Constructor 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

IntegerRange

public IntegerRange()
Deprecated. 
Default constructor.


IntegerRange

public 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.

Parameters:
value - initial value. If value < min it is set to min; if value > max, it is set to max
min - minimum value
max - maximum value
unit - unit increment
block - block increment
Throws:
java.lang.IllegalArgumentException - if (min > max), (unit < 0), (block < 0), (unit > range) or (block > range), where range = (max - min)
Method Detail

getExtendedBeanInfo

public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
Deprecated. 

equals

public boolean equals(java.lang.Object object)
Deprecated. 
Compare to an object.

Overrides:
equals in class java.lang.Object
Parameters:
object - another object
Returns:
true if the other object is an IntegerRage and the minimum, value, maximum, unit increment, and block increment equal; false otherwise.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Deprecated. 
Clone an IntegerRange object

Specified by:
clone in interface com.sas.PublicClonable
Overrides:
clone in class com.sas.Component
Returns:
a clone of this object.
Throws:
java.lang.CloneNotSupportedException - if there is a clone exception.

equals

public boolean equals(IntegerRange otherRange)
Deprecated. 
Compare to an IntegerRange object.

Parameters:
otherRange - another IntegerRange object
Returns:
true if the other object is not null and the minimum, value, maximum, unit increment, and block increment equal; false otherwise.

toString

public java.lang.String toString()
Deprecated. 
Return a string representation of an IntegerRange

Overrides:
toString in class java.lang.Object
Returns:
the string in the format "[min,value,max],unit,block"

setDefaultValues

public void setDefaultValues()
Deprecated. 
Set the default values of all the attributes

Specified by:
setDefaultValues in interface com.sas.ComponentInterface
Overrides:
setDefaultValues in class com.sas.Component
See Also:
ComponentInterface.setDefaultValues()

getMaximum

public int getMaximum()
Deprecated. 
Gets the maximum value of the adjustable object.

Specified by:
getMaximum in interface IntegerRangeInterface
Returns:
the current range maximum

getMinimum

public int getMinimum()
Deprecated. 
Gets the minimum value of the adjustable object.

Specified by:
getMinimum in interface IntegerRangeInterface
Returns:
the current range minimum

getBlockIncrement

public int getBlockIncrement()
Deprecated. 
Gets the block value increment for the adjustable object.

Specified by:
getBlockIncrement in interface IntegerRangeInterface
Returns:
the current block increment

getUnitIncrement

public int getUnitIncrement()
Deprecated. 
Gets the unit value increment for the adjustable object.

Specified by:
getUnitIncrement in interface IntegerRangeInterface
Returns:
the current unit increment

getValue

public int getValue()
Deprecated. 
Gets the current value of the adjustable object.

Specified by:
getValue in interface IntegerRangeInterface
Returns:
the current value

incrementBy

public 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. The current value will be incremented( or decremented ) within the bounds of the maximum and minimum values.

Specified by:
incrementBy in interface com.sas.models.IncrementInterface
Specified by:
incrementBy in interface IntegerRangeInterface
Parameters:
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
Returns:
the new current value

setMaximum

public void setMaximum(int max)
Deprecated. 
Sets the maximum value of the adjustable object. The maximum value is included in the range of the value. If the value is currently higher than the new maximum, it will be set to the maximum value.

Specified by:
setMaximum in interface IntegerRangeInterface
Parameters:
max - the maximum value
Throws:
java.lang.IllegalArgumentException - if max < minimum

setMinimum

public void setMinimum(int min)
Deprecated. 
Sets the minimum value of the adjustable object. The minimum value is included in the range of the value. If the value is currently lower than the new minimum, it will be set to the maximum value.

Specified by:
setMinimum in interface IntegerRangeInterface
Parameters:
min - the minimum value
Throws:
java.lang.IllegalArgumentException - if min > maximum

setBlockIncrement

public void setBlockIncrement(int block)
Deprecated. 
Sets the block value increment for the adjustable object.

Specified by:
setBlockIncrement in interface IntegerRangeInterface
Parameters:
block - the block increment
Throws:
java.lang.IllegalArgumentException - if (block < 0) or (block > (maximum - minimum))

setUnitIncrement

public void setUnitIncrement(int unit)
Deprecated. 
Sets the unit value increment for the adjustable object.

Specified by:
setUnitIncrement in interface IntegerRangeInterface
Parameters:
unit - the unit increment
Throws:
java.lang.IllegalArgumentException - if (unit < 0) or (unit > (maximum - minimum))

setValue

public void setValue(int newValue)
Deprecated. 
Sets the current value of the adjustable object. The current value will only be set to within the range of the minimum and maximum values.

Specified by:
setValue in interface IntegerRangeInterface
Parameters:
value - the current value

setValues

public void setValues(int value,
                      int min,
                      int max)
Deprecated. 
Set the value, minimum and maximum at the same time.

Specified by:
setValues in interface IntegerRangeInterface
Parameters:
value - the new value
min - the new minimum
max - the new maximum
Throws:
java.lang.IllegalArgumentException - if (min > max), (unit < 0), (block < 0), (unit > range) or (block > range), where range = (max - min)

setValues

public void setValues(int value,
                      int min,
                      int max,
                      int unit,
                      int block)
Deprecated. 
Set the value, minimum and maximum at the same time.

Specified by:
setValues in interface IntegerRangeInterface
Parameters:
value - the new value
min - the new minimum
max - the new maximum
unit - the new unit increment
block - the new block increment
Throws:
java.lang.IllegalArgumentException - if (min > max), (unit < 0), (block < 0), (unit > range) or (block > range), where range = (max - min)

getMaximumNumber

public java.lang.Number getMaximumNumber()
Deprecated. 
Gets the maximum value of the integer range.

Specified by:
getMaximumNumber in interface com.sas.models.RangeInterface
Returns:
the current range maximum

getMinimumNumber

public java.lang.Number getMinimumNumber()
Deprecated. 
Gets the minimum value of the integer range.

Specified by:
getMinimumNumber in interface com.sas.models.RangeInterface
Returns:
the current range minimum

getBlockIncrementNumber

public java.lang.Number getBlockIncrementNumber()
Deprecated. 
Gets the block value increment for the adjustable object.

Specified by:
getBlockIncrementNumber in interface com.sas.models.IncrementInterface
Returns:
the current block increment

getUnitIncrementNumber

public java.lang.Number getUnitIncrementNumber()
Deprecated. 
Gets the unit value increment for the adjustable object.

Specified by:
getUnitIncrementNumber in interface com.sas.models.IncrementInterface
Returns:
the current unit increment

getNumberValue

public java.lang.Number getNumberValue()
Deprecated. 
Gets the unit value increment for the adjustable object.

Specified by:
getNumberValue in interface com.sas.models.BoundedNumberInterface
Returns:
the current unit increment

setMaximumNumber

public void setMaximumNumber(java.lang.Number max)
Deprecated. 
Sets the maximum value of the adjustable object. The maximum value is included in the range of the value. If the value is currently higher than the new maximum, it will be set to the maximum value.

Specified by:
setMaximumNumber in interface com.sas.models.RangeInterface
Parameters:
max - the maximum value
Throws:
java.lang.IllegalArgumentException - if max < minimum

setMinimumNumber

public void setMinimumNumber(java.lang.Number min)
Deprecated. 
Sets the minimum value of the adjustable object. The minimum value is included in the range of the value. If the value is currently lower than the new minimum, it will be set to the maximum value.

Specified by:
setMinimumNumber in interface com.sas.models.RangeInterface
Parameters:
min - the minimum value
Throws:
java.lang.IllegalArgumentException - if min > maximum

setBlockIncrementNumber

public void setBlockIncrementNumber(java.lang.Number block)
Deprecated. 
Sets the block value increment for the adjustable object.

Specified by:
setBlockIncrementNumber in interface com.sas.models.IncrementInterface
Parameters:
block - the block increment
Throws:
java.lang.IllegalArgumentException - if (block < 0) or (block > (maximum - minimum))

setUnitIncrementNumber

public void setUnitIncrementNumber(java.lang.Number unit)
Deprecated. 
Sets the unit value increment for the adjustable object.

Specified by:
setUnitIncrementNumber in interface com.sas.models.IncrementInterface
Parameters:
unit - the unit increment
Throws:
java.lang.IllegalArgumentException - if (unit < 0) or (unit > (maximum - minimum))

setNumberValue

public void setNumberValue(java.lang.Number newValue)
Deprecated. 
Sets the current value of the adjustable object. The current value will only be set to within the range of the minimum and maximum values.

Specified by:
setNumberValue in interface com.sas.models.BoundedNumberInterface
Parameters:
value - the current value

setNumberValues

public 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.

Specified by:
setNumberValues in interface com.sas.models.BoundedNumberInterface
Parameters:
value - the new value
min - the new minimum
max - the new maximum
Throws:
java.lang.IllegalArgumentException - if (min > max), (unit < 0), (block < 0), (unit > range) or (block > range), where range = (max - min)

setNumberValues

public 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.

Specified by:
setNumberValues in interface com.sas.models.BoundedNumberInterface
Parameters:
value - the new value
min - the new minimum
max - the new maximum
unit - the new unit increment
block - the new block increment
Throws:
java.lang.IllegalArgumentException - if (min > max), (unit < 0), (block < 0), (unit > range) or (block > range), where range = (max - min)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.