Constructor and Description |
---|
Text() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
equality method
|
String |
getDefault() |
String |
getDescription() |
String |
getName() |
boolean |
getOptional() |
boolean |
getTrim() |
int |
hashCode()
Returns a hash code value for the object.
|
void |
setDefault(String defaultString) |
void |
setDescription(String desc) |
void |
setName(String name)
The name of the attribute.
|
void |
setOptional(boolean optional)
The optional attribute of the text element.
|
void |
setTrim(boolean trim)
The trim attribute of the text element.
|
public boolean equals(Object obj)
equals
in class Object
obj
- an Object
valueboolean
valueObject.hashCode()
,
HashMap
public String getDefault()
public String getDescription()
null
if
no description is available.public String getName()
public boolean getOptional()
public boolean getTrim()
public int hashCode()
Object
HashMap
.
The general contract of hashCode
is:
hashCode
method must consistently return the same integer, provided no
information used in equals
comparisons on the object is modified. This integer need not
remain consistent from one execution of an application to another execution of the same
application.
equals(Object)
method, then calling the
hashCode
method on each of the two objects must produce the same integer result.
Object.equals(java.lang.Object)
method, then calling the hashCode
method on each of the two objects must produce distinct integer results. However, the programmer
should be aware that producing distinct integer results for unequal objects may improve the
performance of hash tables.
As much as is reasonably practical, the hashCode method defined by class Object
does
return distinct integers for distinct objects. (This is typically implemented by converting the
internal address of the object into an integer, but this implementation technique is not required
by the JavaTM programming language.)
hashCode
in class Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)
public void setDefault(String defaultString)
defaultString
- default text for the string.public void setDescription(String desc)
desc
- Description of the text.public void setName(String name)
name
- the name of the attributepublic void setOptional(boolean optional)
optional
- if true this is optionalpublic void setTrim(boolean trim)
trim
- if true this String.trim() is called on
the contents of the text element.