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

## com.novell.service.nds
Class NdsCounter

    java.lang.Object
      |
      +--com.novell.service.nds.NdsCounter

public class NdsCounter
extends java.lang.Object
implements NdsAttributeValue, , java.lang.Cloneable, java.io.Serializable

Provides access to values of the Counter attribute. It is used for attributes whose values are incrementally modified numeric signed integers. Any attribute defined using Counter is single-valued. Any value added to an attribute of the Counter syntax is arithmetically added to the total, and any value deleted is arithmetically subtracted from the total.

Matching Rules: Equality and Ordering

See Also:
  `NdsSyntaxId`, Serialized Form

Constructor Summary
`NdsCounter(int value)` Constructs an NdsCounter object from an int value.

Method Summary
`boolean` | `approximate(java.lang.Object anObject)` Compares two Objects using the approximate matching rule.
`byte` | `byteValue()` Returns the value of this NDS object as a byte.
`java.lang.Object` | `clone()` Creates a new object of the same class as this object.
`int` | `compareTo(java.lang.Object anObject)` Compares two objects for ordering, or compares two strings lexicographically.
`double` | `doubleValue()` Returns the value of this NDS object as a double.
`boolean` | `equals(java.lang.Object anObject)` Compares two Objects for equality.
`float` | `floatValue()` Returns the value of this NDS object as a float.
`long` | `getCounter()` Returns the long value of Counter stored in the object data member.
`int` | `getNdsSyntaxId()` Returns the int that represents the NDS syntax ID.
`int` | `intValue()` Returns the value of this NDS object as an int.
`long` | `longValue()` Returns the value of this NDS object as a long.
`short` | `shortValue()` Returns the value of this NDS object as a short.
`boolean` | `supportsMatchingRules(int matchingRules)` Checks to see if this object supports the specified matching rules.
`java.lang.String` | `toString()` Generates and returns a string representation of the object.

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

Constructor Detail

### NdsCounter

    public NdsCounter(int value)

  Constructs an NdsCounter object from an int value. Any integer added to the value is arithmetically added to the total, and any integer deleted is arithmetically subtracted from the total.
  Parameters:
    `value` - An int stored value.

Method Detail

### compareTo

    public int compareTo(java.lang.Object anObject)
                  throws java.lang.Exception

  Compares two objects for ordering, or compares two strings lexicographically. For the Case Exact String syntax, the compareTo method compares this NDS Object with a reference NDS Object contained in the anObject parameter. The comparison is done according to the substrings matching rule for this syntax.
  Parameters:
    `anObject` - The reference NDS Object with which to compare.
  Returns:
    An int set to 0 if the reference Object is equal to this Object; an int <0 if the reference Object is less than this Object; an int >0 if the reference Object is greater than this Object.
  Throws:
    java.lang.IllegalArgumentException - The passed-in object is of a different type than this NDS Object.

### equals

    public boolean equals(java.lang.Object anObject)

  Compares two Objects for equality. The equals method compares this object value with the value of the reference object in the anObject parameter.

  The equals method implements the most discriminating possible equivalence relation on objects; that is, for any reference values X and Y, this method returns TRUE if and only if X and Y refer to the same object (X==Y has the value TRUE).

  Parameters:
    `anObject` - The reference object with which to compare.
  Returns:
    A boolean set to TRUE if and only if the argument is not NULL and is an NDS integer object that contains the same value as this object, otherwise set to FALSE.
  Overrides:
    equals in class java.lang.Object

### intValue

    public int intValue()

  Returns the value of this NDS object as an int.
  Specified by:
    intValue in interface
  Returns:
    The int value of this object.

### longValue

    public long longValue()

  Returns the value of this NDS object as a long.
  Specified by:
    longValue in interface
  Returns:
    The long value of this object.

### floatValue

    public float floatValue()

  Returns the value of this NDS object as a float.
  Specified by:
    floatValue in interface
  Returns:
    The float value of this object.

### doubleValue

    public double doubleValue()

  Returns the value of this NDS object as a double.
  Specified by:
    doubleValue in interface
  Returns:
    The double value of this object.

### byteValue

    public byte byteValue()

  Returns the value of this NDS object as a byte.
  Specified by:
    byteValue in interface
  Returns:
    The byte value of this object.

### shortValue

    public short shortValue()

  Returns the value of this NDS object as a short.
  Specified by:
    shortValue in interface
  Returns:
    The short value of this object.

### approximate

    public boolean approximate(java.lang.Object anObject)
                        throws java.lang.Exception

  Compares two Objects using the approximate matching rule. The approximate method does not apply to the NdsCounter syntax because this syntax does not support the approximate equals matching rule.
  Specified by:
    approximate in interface NdsAttributeValue

### getNdsSyntaxId

    public int getNdsSyntaxId()

  Returns the int that represents the NDS syntax ID.
  Specified by:
    getNdsSyntaxId in interface NdsAttributeValue
  Returns:
    The syntax ID as an int.

### supportsMatchingRules

    public boolean supportsMatchingRules(int matchingRules)

  Checks to see if this object supports the specified matching rules.

  The NdsCounter syntax supports the equality and ordering matching rules.

  Specified by:
    supportsMatchingRules in interface NdsAttributeValue
  Parameters:
    `matchingRules` - The set of matching rules to check.
  Returns:
    A Boolean set to TRUE if the matching rules for this object are equal to the matchingRules parameter.

### clone

    public java.lang.Object clone()

  Creates a new object of the same class as this object. It then initializes each of the new object's fields by assigning them the same value as the corresponding fields in this object. No constructor is called.
  Returns:
    A clone of this object instance containing the cloned syntax.
  Overrides:
    clone in class java.lang.Object

### toString

    public java.lang.String toString()

  Generates and returns a string representation of the object. In general, the toString method returns a string that textually represent this object. The result should be a concise but informative representation that is easy to read.
  Returns:
    The String representation of the object.
  Overrides:
    toString in class java.lang.Object

### getCounter

    public long getCounter()

  Returns the long value of Counter stored in the object data member.
  Returns:
    The stored long value.

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