public abstract class TextSyntax extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable
TextSyntax is the abstract base class of all attribute
classes which provide a string as value (e.g. the location of the printer).
A TextSyntax instance consists of a string value and a
locale which indicates the language of the locale of the string.
| Modifier | Constructor and Description |
|---|---|
protected |
TextSyntax(java.lang.String value,
java.util.Locale locale)
Creates a
TextSyntax object with the given value
and locale. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests if the given object is equal to this object.
|
java.util.Locale |
getLocale()
Returns the locale of this syntax object.
|
java.lang.String |
getValue()
Returns the value of this syntax object.
|
int |
hashCode()
Returns the hashcode for this object.
|
java.lang.String |
toString()
Returns a string representing the object.
|
protected TextSyntax(java.lang.String value, java.util.Locale locale)
TextSyntax object with the given value
and locale.value - the value for this syntaxlocale - the locale to use, if null the default
locale is used.java.lang.NullPointerException - if value is nullpublic java.lang.String getValue()
public java.util.Locale getLocale()
public int hashCode()
hashCode in class java.lang.ObjectObject.equals(Object),
System.identityHashCode(Object)public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to testObject.hashCode()public java.lang.String toString()
toString in class java.lang.ObjectObject.getClass(),
Object.hashCode(),
Class.getName(),
Integer.toHexString(int)