javax.print.attribute
Class IntegerSyntax

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.print.attribute.IntegerSyntax
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable
Direct Known Subclasses:
Copies sample code for javax.print.attribute.standard.Copies definition code for javax.print.attribute.standard.Copies , JobImpressions sample code for javax.print.attribute.standard.JobImpressions definition code for javax.print.attribute.standard.JobImpressions , JobImpressionsCompleted sample code for javax.print.attribute.standard.JobImpressionsCompleted definition code for javax.print.attribute.standard.JobImpressionsCompleted , JobKOctets sample code for javax.print.attribute.standard.JobKOctets definition code for javax.print.attribute.standard.JobKOctets , JobKOctetsProcessed sample code for javax.print.attribute.standard.JobKOctetsProcessed definition code for javax.print.attribute.standard.JobKOctetsProcessed , JobMediaSheets sample code for javax.print.attribute.standard.JobMediaSheets definition code for javax.print.attribute.standard.JobMediaSheets , JobMediaSheetsCompleted sample code for javax.print.attribute.standard.JobMediaSheetsCompleted definition code for javax.print.attribute.standard.JobMediaSheetsCompleted , JobPriority sample code for javax.print.attribute.standard.JobPriority definition code for javax.print.attribute.standard.JobPriority , JobPrioritySupported sample code for javax.print.attribute.standard.JobPrioritySupported definition code for javax.print.attribute.standard.JobPrioritySupported , NumberOfDocuments sample code for javax.print.attribute.standard.NumberOfDocuments definition code for javax.print.attribute.standard.NumberOfDocuments , NumberOfInterveningJobs sample code for javax.print.attribute.standard.NumberOfInterveningJobs definition code for javax.print.attribute.standard.NumberOfInterveningJobs , NumberUp sample code for javax.print.attribute.standard.NumberUp definition code for javax.print.attribute.standard.NumberUp , PagesPerMinute sample code for javax.print.attribute.standard.PagesPerMinute definition code for javax.print.attribute.standard.PagesPerMinute , PagesPerMinuteColor sample code for javax.print.attribute.standard.PagesPerMinuteColor definition code for javax.print.attribute.standard.PagesPerMinuteColor , QueuedJobCount sample code for javax.print.attribute.standard.QueuedJobCount definition code for javax.print.attribute.standard.QueuedJobCount

public abstract class IntegerSyntax
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable

Class IntegerSyntax is an abstract base class providing the common implementation of all attributes with integer values.

Under the hood, an integer attribute is just an integer. You can get an integer attribute's integer value by calling getValue() sample code for javax.print.attribute.IntegerSyntax.getValue() definition code for javax.print.attribute.IntegerSyntax.getValue() . An integer attribute's integer value is established when it is constructed (see IntegerSyntax(int) sample code for javax.print.attribute.IntegerSyntax.IntegerSyntax(int) definition code for javax.print.attribute.IntegerSyntax.IntegerSyntax(int) ). Once constructed, an integer attribute's value is immutable.

See Also:
Serialized Form

Constructor Summary
protected IntegerSyntax sample code for javax.print.attribute.IntegerSyntax.IntegerSyntax(int) definition code for javax.print.attribute.IntegerSyntax.IntegerSyntax(int) (int value)
          Construct a new integer attribute with the given integer value.
protected IntegerSyntax sample code for javax.print.attribute.IntegerSyntax.IntegerSyntax(int, int, int) definition code for javax.print.attribute.IntegerSyntax.IntegerSyntax(int, int, int) (int value, int lowerBound, int upperBound)
          Construct a new integer attribute with the given integer value, which must lie within the given range.
 
Method Summary
 boolean equals sample code for javax.print.attribute.IntegerSyntax.equals(java.lang.Object) definition code for javax.print.attribute.IntegerSyntax.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  object)
          Returns whether this integer attribute is equivalent to the passed in object.
 int getValue sample code for javax.print.attribute.IntegerSyntax.getValue() definition code for javax.print.attribute.IntegerSyntax.getValue() ()
          Returns this integer attribute's integer value.
 int hashCode sample code for javax.print.attribute.IntegerSyntax.hashCode() definition code for javax.print.attribute.IntegerSyntax.hashCode() ()
          Returns a hash code value for this integer attribute.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.print.attribute.IntegerSyntax.toString() definition code for javax.print.attribute.IntegerSyntax.toString() ()
          Returns a string value corresponding to this integer attribute.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

IntegerSyntax sample code for javax.print.attribute.IntegerSyntax(int) definition code for javax.print.attribute.IntegerSyntax(int)

protected IntegerSyntax(int value)
Construct a new integer attribute with the given integer value.

Parameters:
value - Integer value.

IntegerSyntax sample code for javax.print.attribute.IntegerSyntax(int, int, int) definition code for javax.print.attribute.IntegerSyntax(int, int, int)

protected IntegerSyntax(int value,
                        int lowerBound,
                        int upperBound)
Construct a new integer attribute with the given integer value, which must lie within the given range.

Parameters:
value - Integer value.
lowerBound - Lower bound.
upperBound - Upper bound.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - (Unchecked exception) Thrown if value is less than lowerBound or greater than upperBound.
Method Detail

getValue sample code for javax.print.attribute.IntegerSyntax.getValue() definition code for javax.print.attribute.IntegerSyntax.getValue()

public int getValue()
Returns this integer attribute's integer value.

Returns:
the integer value

equals sample code for javax.print.attribute.IntegerSyntax.equals(java.lang.Object) definition code for javax.print.attribute.IntegerSyntax.equals(java.lang.Object)

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  object)
Returns whether this integer attribute is equivalent to the passed in object. To be equivalent, all of the following conditions must be true:
  1. object is not null.
  2. object is an instance of class IntegerSyntax.
  3. This integer attribute's value and object's value are equal.

Overrides:
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) in class Object sample code for java.lang.Object definition code for java.lang.Object
Parameters:
object - Object to compare to.
Returns:
True if object is equivalent to this integer attribute, false otherwise.
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

hashCode sample code for javax.print.attribute.IntegerSyntax.hashCode() definition code for javax.print.attribute.IntegerSyntax.hashCode()

public int hashCode()
Returns a hash code value for this integer attribute. The hash code is just this integer attribute's integer value.

Overrides:
hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

toString sample code for javax.print.attribute.IntegerSyntax.toString() definition code for javax.print.attribute.IntegerSyntax.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a string value corresponding to this integer attribute. The string value is just this integer attribute's integer value converted to a string.

Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a string representation of the object.