APIdia Launch Partner
Top Description Fields Constructors Methods
javax.print.attribute

public abstract Class IntegerSyntax

extends Object
implements Serializable, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, java.io.Serializable
Known Direct Subclasses
javax.print.attribute.standard.Copies, javax.print.attribute.standard.JobImpressions, javax.print.attribute.standard.JobKOctets, javax.print.attribute.standard.JobKOctetsProcessed, javax.print.attribute.standard.JobMediaSheets, javax.print.attribute.standard.JobMediaSheetsCompleted, javax.print.attribute.standard.JobPriority, javax.print.attribute.standard.JobPrioritySupported, javax.print.attribute.standard.NumberOfDocuments, javax.print.attribute.standard.NumberOfInterveningJobs, javax.print.attribute.standard.NumberUp, javax.print.attribute.standard.PagesPerMinuteColor, javax.print.attribute.standard.QueuedJobCount, javax.print.attribute.standard.JobImpressionsCompleted, javax.print.attribute.standard.PagesPerMinute
Imports
java.io.Serial, .Serializable

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(). An integer attribute's integer value is established when it is constructed (see IntegerSyntax(int)). Once constructed, an integer attribute's value is immutable.

Authors
David Mendenhall, Alan Kaminsky

Field Summary

Modifier and TypeField and Description
private static final long
serialVersionUID

Use serialVersionUID from JDK 1.4 for interoperability.

private int
value

This integer attribute's integer value.

Constructor Summary

AccessConstructor and Description
protected
IntegerSyntax(int
Integer value
value
)

Construct a new integer attribute with the given integer value.

protected
IntegerSyntax(int
Integer value
value
,
int
Lower bound
lowerBound
,
int
Upper bound
upperBound
)

Construct a new integer attribute with the given integer value, which must lie within the given range.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if object is equivalent to this integer attribute, false otherwise
equals
(Object
Object to compare to
object
)

Overrides java.lang.Object.equals.

Returns whether this integer attribute is equivalent to the passed in object.

public int

Returns:

the integer value
getValue
()

Returns this integer attribute's integer value.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this integer attribute.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string value corresponding to this integer attribute.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Use serialVersionUID from JDK 1.4 for interoperability.

Annotations
@Serial
valueback to summary
private int value

This integer attribute's integer value.

Constructor Detail

IntegerSyntaxback to summary
protected IntegerSyntax(int value)

Construct a new integer attribute with the given integer value.

Parameters
value:int

Integer value

IntegerSyntaxback to summary
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:int

Integer value

lowerBound:int

Lower bound

upperBound:int

Upper bound

Exceptions
IllegalArgumentException:
if value is less than lowerBound or greater than upperBound

Method Detail

equalsback to summary
public boolean equals(Object object)

Overrides java.lang.Object.equals.

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.
Parameters
object:Object

Object to compare to

Returns:boolean

true if object is equivalent to this integer attribute, false otherwise

Annotations
@Override
getValueback to summary
public int getValue()

Returns this integer attribute's integer value.

Returns:int

the integer value

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this integer attribute. The hash code is just this integer attribute's integer value.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.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.

Annotations
@Override