| java.lang.Object javax.print.attribute.TextSyntax
All known Subclasses: javax.print.attribute.standard.PrinterMakeAndModel, javax.print.attribute.standard.OutputDeviceAssigned, javax.print.attribute.standard.JobName, javax.print.attribute.standard.JobMessageFromOperator, javax.print.attribute.standard.PrinterName, javax.print.attribute.standard.PrinterMessageFromOperator, javax.print.attribute.standard.PrinterInfo, javax.print.attribute.standard.PrinterLocation, javax.print.attribute.standard.JobOriginatingUserName, javax.print.attribute.standard.DocumentName, javax.print.attribute.standard.RequestingUserName,
TextSyntax | abstract public class TextSyntax implements Serializable,Cloneable(Code) | | Class TextSyntax is an abstract base class providing the common
implementation of all attributes whose value is a string. The text attribute
includes a locale to indicate the natural language. Thus, a text attribute
always represents a localized string. Once constructed, a text attribute's
value is immutable.
author: David Mendenhall author: Alan Kaminsky |
Constructor Summary | |
protected | TextSyntax(String value, Locale locale) Constructs a TextAttribute with the specified string and locale. |
Method Summary | |
public boolean | equals(Object object) Returns whether this text attribute is equivalent to the passed in
object. | public Locale | getLocale() Returns this text attribute's text string's natural language (locale). | public String | getValue() Returns this text attribute's text string. | public int | hashCode() Returns a hashcode for this text attribute. | public String | toString() Returns a String identifying this text attribute. |
TextSyntax | protected TextSyntax(String value, Locale locale)(Code) | | Constructs a TextAttribute with the specified string and locale.
Parameters: value - Text string. Parameters: locale - Natural language of the text string. nullis interpreted to mean the default locale for as returnedby Locale.getDefault() exception: NullPointerException - (unchecked exception) Thrown if value is null. |
equals | public boolean equals(Object object)(Code) | | Returns whether this text attribute is equivalent to the passed in
object. To be equivalent, all of the following conditions must be true:
-
object is not null.
-
object is an instance of class TextSyntax.
-
This text attribute's underlying string and
object 's
underlying string are equal.
-
This text attribute's locale and
object 's locale are
equal.
Parameters: object - Object to compare to. True if object is equivalent to this textattribute, false otherwise. |
getLocale | public Locale getLocale()(Code) | | Returns this text attribute's text string's natural language (locale).
the locale |
getValue | public String getValue()(Code) | | Returns this text attribute's text string.
the text string. |
hashCode | public int hashCode()(Code) | | Returns a hashcode for this text attribute.
A hashcode value for this object. |
toString | public String toString()(Code) | | Returns a String identifying this text attribute. The String is
the attribute's underlying text string.
A String identifying this object. |
|
|