ComparableExt<Field>StringFieldExtpublic class StringField extends SimpleField
| Constructor | Description |
|---|---|
StringField() |
Creates an empty field with empty string.
|
StringField(java.lang.String value) |
Creates new StringField with given value.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
compareTo(SimpleField arg0) |
Compares two strings lexicographically.
|
void |
copy(Field field) |
It makes a copy of class variables.
|
Field |
duplicate() |
Makes a new instance of a field.
|
boolean |
equals(java.lang.Object arg0) |
Checks equivalence of two objects
|
java.lang.String |
get() |
Reads the value of StringField.
|
int |
hashCode() |
Provides hashcode of a given
StringField value. |
void |
set(java.lang.String string) |
Changes the value of StringField.
|
java.lang.String |
toString() |
Returns a
String which represents value of this field. |
isGenerated, setGeneratedcompareTo, isSimilarTo, isUnknown, setUnknownpublic StringField()
public StringField(java.lang.String value)
null).value - new string to be setInvalidValueException - when value doesn't match the patternjava.lang.NullPointerException - when string value is nullset(String)public void copy(Field field)
value and unknown.copy in class Fieldfield - any object which is instance of StringFieldInvalidTypeException - when field is not StringFieldjava.lang.NullPointerException - if given field is nullpublic java.lang.String get()
UnknownValueException - if value is unknownpublic void set(java.lang.String string)
isUnknown() is KNOWN).
In this method any String value is accepted, except null.string - new value to be set:
it must be a number [0-9]+
or an identifier [A-Za-z_][A-Za-z_0-9]*InvalidValueException - when value doesn't match the patternjava.lang.NullPointerException - when string value is nullpublic Field duplicate()
Fieldpublic int compareTo(SimpleField arg0)
arg0 - object to be compared with this string fieldjava.lang.ClassCastException - if given object is not StringFieldjava.lang.NullPointerException - when given object is nullUnknownValueException - when field's value is unknownpublic boolean equals(java.lang.Object arg0)
equals in class java.lang.Objectarg0 - object to be compared with this string fieldjava.lang.NullPointerException - when given object is nullpublic int hashCode()
StringField value.hashCode in class java.lang.ObjectStringField valuepublic java.lang.String toString()
String which represents value of this field.
If value is known, the result is value.toString in class java.lang.Object