javax.print.attribute

Class IntegerSyntax

public abstract class IntegerSyntax extends Object implements Cloneable, Serializable

IntegerSyntax is the abstract base class of all attribute classes having an integer as value.
Constructor Summary
protected IntegerSyntax(int value)
Creates a IntegerSyntax with the given value.
protected IntegerSyntax(int value, int lowerBound, int upperBound)
Creates a IntegerSyntax with the given integer value and checks if the value lies inside the given bounds..
Method Summary
booleanequals(Object obj)
Tests if the given object is equal to this object.
intgetValue()
Returns the value of this object.
inthashCode()
Returns the hashcode for this object.
StringtoString()
Returns the string representation for this object.

Constructor Detail

IntegerSyntax

protected IntegerSyntax(int value)
Creates a IntegerSyntax with the given value.

Parameters: value the integer to set

IntegerSyntax

protected IntegerSyntax(int value, int lowerBound, int upperBound)
Creates a IntegerSyntax with the given integer value and checks if the value lies inside the given bounds..

Parameters: value the integer to set lowerBound the lower bound for the value upperBound the upper bound for the value

Throws: IllegalArgumentException if value < lowerBound or value > upperBound

Method Detail

equals

public boolean equals(Object obj)
Tests if the given object is equal to this object.

Parameters: obj the object to test

Returns: true if both objects are equal, false otherwise.

getValue

public int getValue()
Returns the value of this object.

Returns: The integer value.

hashCode

public int hashCode()
Returns the hashcode for this object.

Returns: The hashcode.

toString

public String toString()
Returns the string representation for this object.

Returns: The string representation.