javax.print.attribute
Class TextSyntax

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.print.attribute.TextSyntax
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:
DocumentName sample code for javax.print.attribute.standard.DocumentName definition code for javax.print.attribute.standard.DocumentName , JobMessageFromOperator sample code for javax.print.attribute.standard.JobMessageFromOperator definition code for javax.print.attribute.standard.JobMessageFromOperator , JobName sample code for javax.print.attribute.standard.JobName definition code for javax.print.attribute.standard.JobName , JobOriginatingUserName sample code for javax.print.attribute.standard.JobOriginatingUserName definition code for javax.print.attribute.standard.JobOriginatingUserName , OutputDeviceAssigned sample code for javax.print.attribute.standard.OutputDeviceAssigned definition code for javax.print.attribute.standard.OutputDeviceAssigned , PrinterInfo sample code for javax.print.attribute.standard.PrinterInfo definition code for javax.print.attribute.standard.PrinterInfo , PrinterLocation sample code for javax.print.attribute.standard.PrinterLocation definition code for javax.print.attribute.standard.PrinterLocation , PrinterMakeAndModel sample code for javax.print.attribute.standard.PrinterMakeAndModel definition code for javax.print.attribute.standard.PrinterMakeAndModel , PrinterMessageFromOperator sample code for javax.print.attribute.standard.PrinterMessageFromOperator definition code for javax.print.attribute.standard.PrinterMessageFromOperator , PrinterName sample code for javax.print.attribute.standard.PrinterName definition code for javax.print.attribute.standard.PrinterName , RequestingUserName sample code for javax.print.attribute.standard.RequestingUserName definition code for javax.print.attribute.standard.RequestingUserName

public abstract class TextSyntax
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 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.

See Also:
Serialized Form

Constructor Summary
protected TextSyntax sample code for javax.print.attribute.TextSyntax.TextSyntax(java.lang.String, java.util.Locale) definition code for javax.print.attribute.TextSyntax.TextSyntax(java.lang.String, java.util.Locale) (String sample code for java.lang.String definition code for java.lang.String  value, Locale sample code for java.util.Locale definition code for java.util.Locale  locale)
          Constructs a TextAttribute with the specified string and locale.
 
Method Summary
 boolean equals sample code for javax.print.attribute.TextSyntax.equals(java.lang.Object) definition code for javax.print.attribute.TextSyntax.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  object)
          Returns whether this text attribute is equivalent to the passed in object.
 Locale sample code for java.util.Locale definition code for java.util.Locale getLocale sample code for javax.print.attribute.TextSyntax.getLocale() definition code for javax.print.attribute.TextSyntax.getLocale() ()
          Returns this text attribute's text string's natural language (locale).
 String sample code for java.lang.String definition code for java.lang.String getValue sample code for javax.print.attribute.TextSyntax.getValue() definition code for javax.print.attribute.TextSyntax.getValue() ()
          Returns this text attribute's text string.
 int hashCode sample code for javax.print.attribute.TextSyntax.hashCode() definition code for javax.print.attribute.TextSyntax.hashCode() ()
          Returns a hashcode for this text attribute.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.print.attribute.TextSyntax.toString() definition code for javax.print.attribute.TextSyntax.toString() ()
          Returns a String identifying this text 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

TextSyntax sample code for javax.print.attribute.TextSyntax(java.lang.String, java.util.Locale) definition code for javax.print.attribute.TextSyntax(java.lang.String, java.util.Locale)

protected TextSyntax(String sample code for java.lang.String definition code for java.lang.String  value,
                     Locale sample code for java.util.Locale definition code for java.util.Locale  locale)
Constructs a TextAttribute with the specified string and locale.

Parameters:
value - Text string.
locale - Natural language of the text string. null is interpreted to mean the default locale for as returned by Locale.getDefault()
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - (unchecked exception) Thrown if value is null.
Method Detail

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

public String sample code for java.lang.String definition code for java.lang.String  getValue()
Returns this text attribute's text string.

Returns:
the text string.

getLocale sample code for javax.print.attribute.TextSyntax.getLocale() definition code for javax.print.attribute.TextSyntax.getLocale()

public Locale sample code for java.util.Locale definition code for java.util.Locale  getLocale()
Returns this text attribute's text string's natural language (locale).

Returns:
the locale

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

public int hashCode()
Returns a hashcode for this text attribute.

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 hashcode 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

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

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  object)
Returns whether this text 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 TextSyntax.
  3. This text attribute's underlying string and object's underlying string are equal.
  4. This text attribute's locale and object's locale 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 text 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

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

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a String identifying this text attribute. The String is the attribute's underlying text 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 identifying this object.