public abstract class TextSyntax extends Object implements Cloneable, 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(String value,
Locale locale)
Creates a
TextSyntax object with the given value
and locale. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Tests if the given object is equal to this object.
|
Locale |
getLocale()
Returns the locale of this syntax object.
|
String |
getValue()
Returns the value of this syntax object.
|
int |
hashCode()
Returns the hashcode for this object.
|
String |
toString()
Returns a string representing the object.
|
protected TextSyntax(String value, 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.NullPointerException - if value is nullpublic int hashCode()
hashCode in class ObjectObject.equals(Object),
System.identityHashCode(Object)public boolean equals(Object obj)
equals in class Objectobj - the object to testObject.hashCode()public String toString()
toString in class ObjectObject.getClass(),
Object.hashCode(),
Class.getName(),
Integer.toHexString(int)