Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.nds.dirxml.engine.gcv
Class GCIntegerValue

    java.lang.Object
      com.novell.nds.dirxml.engine.gcv.GCValue
          com.novell.nds.dirxml.engine.gcv.GCIntegerValue

All Implemented Interfaces:
  ConfigElement

    public class GCIntegerValue

extends GCValue

Class representing "integer" type Global Configuration Values.

GCVs of type "integer" may be either unrestricted or range-restricted.

Unrestricted integer GCVs may have values ranging from `java.lang.Integer.MIN_VALUE` to `java.lang.Integer.MAX_VALUE`.

Range-restricted integer GCVs may have a lower bound, an upper bound, or both. If the lower bound is not specified the minimum value is `java.lang.Integer.MIN_VALUE`. If the upper bound is not specified the maximum value is`java.lang.Integer.MAX_VALUE`. The GCV value must fall within the inclusive range specified by the bound(s).

Lexical value representations of "integer" GCVs must match the following production:

`Integer ::= '-'? Digit+`
`Digit ::= '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'`

The default value of a newly-constructed `GCIntegerValue` object is `0`.

Field Summary

Fields inherited from class com.novell.nds.dirxml.engine.gcv.GCValue
`modified, parent, TYPE_BOOLEAN, TYPE_DN, TYPE_DN_REF, TYPE_ENUM, TYPE_GCV_REF, TYPE_GROUP, TYPE_HEADER, TYPE_INTEGER, TYPE_LIST, TYPE_PASSWORD_REF, TYPE_REAL, TYPE_STRING, TYPE_SUBORDINATES`

Method Summary
`int` | `getIntegerValue()` Return the value of this GCIntegerValue.
`int` | `getRangeHi()` Return the high end of any restrictive range that has been set.
`int` | `getRangeLo()` Return the low end of any restrictive range that has been set.
`String` | `getValue()` Return the current value of this instance.
`void` | `parseValue(String value)` Parse the passed value based on the type and instance rules for this "integer" GCV.
`void` | `setRangeHi(int rHi)` Set the high end of a restrictive range for this integer value.
`void` | `setRangeHi(String rHi)` Set the high end of a restrictive range for this integer value.
`void` | `setRangeLo(int rLo)` Set the low end of a restrictive range for this integer value.
`void` | `setRangeLo(String rLo)` Set the low end of a restrictive range for this integer value.
`void` | `setValue(String strValue)` Set the value for this instance.

Methods inherited from class com.novell.nds.dirxml.engine.gcv.GCValue
`construct, construct, constructGCVRef, constructGroup, constructHeader, constructSubordinates, getDescription, getDescriptionRef, getDisplayName, getDisplayNameRef, getHidden, getName, getType, getTypeString, getXMLValue, hasBeenModified, localize, resetModified, setDescription, setDescriptionRef, setDisplayName, setDisplayNameRef, setHidden, toXML, typeFromString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### parseValue

    public void parseValue(String value)
                    throws GCVException

  Parse the passed value based on the type and instance rules for this "integer" GCV.

  The passed value must consist of an optional minus character '-', followed by 1 or more digit characters '0' through '9'. In addition, the value must fall within the range restriction if set, or, if no range has been set, the value must be greater than or equal to `java.lang.Integer.MIN_VALUE` and less than or equal to `java.lang.Integer.MAX_VALUE`.

  Specified by:
    `parseValue` in class `GCValue`
  Parameters:
    `value` - Value `String` to parse
  Throws:
    `GCVException` - thrown if value does not match "integer" or instance constraints.

### getValue

    public String getValue()

  Return the current value of this instance.

  Specified by:
    `getValue` in class `GCValue`
  Returns:
    String containing lexical representation of this "integer" value.

### getIntegerValue

    public int getIntegerValue()

  Return the value of this GCIntegerValue.

  Returns:
    value

### setValue

    public void setValue(String strValue)
                  throws GCVException

  Set the value for this instance.

  The passed value must conform to the rules noted under `parseValue()`.

  Specified by:
    `setValue` in class `GCValue`
  Parameters:
    `strValue` - Value `String` for this instance.
  Throws:
    `GCVException` - thrown if value is doesn't not parse correctly.
  See Also:
    `parseValue(java.lang.String)`

### getRangeLo

    public int getRangeLo()

  Return the low end of any restrictive range that has been set.

  If no low end has been set the return is `java.lang.Integer.MIN_VALUE`.

  Returns:
    low end range value, or `java.lang.Integer.MIN_VALUE`.

### setRangeLo

    public void setRangeLo(int rLo)

  Set the low end of a restrictive range for this integer value.

  If the passed value in `rLo` is greater than the high end of the restrictive range then the high end is set equal to the new low end.

  To remove the low end of a restrictive range pass `java.lang.Integer.MIN_VALUE` for `rLo`.

  Parameters:
    `rLo` - new low end of restrictive range.

### setRangeLo

    public void setRangeLo(String rLo)
                    throws GCVException

  Set the low end of a restrictive range for this integer value.

  If the passed value in `rLo` is greater than the high end of the restrictive range then the high end is set equal to the new low end.

  To remove the low end of a restrictive range pass `java.lang.Integer.MIN_VALUE` for `rLo`.

  The passed string value must match the lexical rules for "integer" values.

  Parameters:
    `rLo` - new low end of restrictive range.
  Throws:
    `GCVException` - thrown if passed `rLo` string value is not a valid lexical representation of an "integer" value.

### getRangeHi

    public int getRangeHi()

  Return the high end of any restrictive range that has been set.

  If no high end has been set the return is `java.lang.Integer.MAX_VALUE`.

  Returns:
    high end range value, or `java.lang.Integer.MAX_VALUE`.

### setRangeHi

    public void setRangeHi(int rHi)

  Set the high end of a restrictive range for this integer value.

  If the passed value in `rHi` is less than the low end of the restrictive range then the low end is set equal to the new high end.

  To remove the high end of a restrictive range pass `java.lang.Integer.MAX_VALUE` for `rHi`.

  Parameters:
    `rHi` - new high end of restrictive range.

### setRangeHi

    public void setRangeHi(String rHi)
                    throws GCVException

  Set the high end of a restrictive range for this integer value.

  If the passed value in `rHi` is less than the low end of the restrictive range then the low end is set equal to the new high end.

  To remove the high end of a restrictive range pass `java.lang.Integer.MAX_VALUE` for `rHi`.

  The passed string value must match the lexical rules for "integer" values.

  Parameters:
    `rHi` - new high end of restrictive range.
  Throws:
    `GCVException` - thrown if passed `rHi` string value is not a valid lexical representation of an "integer" value.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD