javax.print.attribute
public abstract class IntegerSyntax extends Object implements Cloneable, Serializable
IntegerSyntax
is the abstract base class of all attribute
classes having an integer as value.Modifier | Constructor and Description |
---|---|
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.. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Tests if the given object is equal to this object.
|
int |
getValue()
Returns the value of this object.
|
int |
hashCode()
Returns the hashcode for this object.
|
String |
toString()
Returns the string representation for this object.
|
protected IntegerSyntax(int value)
IntegerSyntax
with the given value.value
- the integer to setprotected IntegerSyntax(int value, int lowerBound, int upperBound)
IntegerSyntax
with the given integer value
and checks if the value lies inside the given bounds..value
- the integer to setlowerBound
- the lower bound for the valueupperBound
- the upper bound for the valueIllegalArgumentException
- if value < lowerBound
or value > upperBoundpublic int getValue()
public boolean equals(Object obj)
equals
in class Object
obj
- the object to testtrue
if both objects are equal,
false
otherwise.Object.hashCode()
public int hashCode()
hashCode
in class Object
Object.equals(Object)
,
System.identityHashCode(Object)
public String toString()
toString
in class Object
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)