Constructor and Description |
---|
TextValue(byte[] value)
Constructs a
TextValue with the specified value. |
TextValue(java.lang.String value)
Constructs a
TextValue with the specified value. |
TextValue(java.lang.String name,
byte[] value)
Constructs a
TextValue with the specified name and value |
TextValue(java.lang.String name,
java.lang.String value)
Constructs a
TextValue with the specified name and value |
Modifier and Type | Method and Description |
---|---|
void |
accept(ValueVisitor v)
Accepts a
ValueVisitor to be able to be traversed |
int |
compareTo(TextValue o) |
TextValue |
copyWith(java.lang.String name)
Creates a copy of the value with the specified name
|
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this object.
|
java.util.Optional<byte[]> |
getBytes()
Returns the content of this
Value |
java.lang.String |
getName()
Returns the name of the value
|
java.util.Optional<java.lang.String> |
getString()
Returns the content of this
Value |
int |
hashCode() |
java.lang.String |
toString() |
public TextValue(java.lang.String name, byte[] value)
TextValue
with the specified name and valuename
- name of the Value
value
- content of the Value
in byte arraypublic TextValue(byte[] value)
TextValue
with the specified value. The name of this value is anonymous.value
- content of the Value
public TextValue(java.lang.String name, java.lang.String value)
TextValue
with the specified name and valuename
- name of the Value
value
- content of the Value
in String
public TextValue(java.lang.String value)
TextValue
with the specified value. The name of this value is anonymous.value
- content of the Value
@Nonnull public java.util.Optional<byte[]> getBytes()
Value
Optional
of the content of this Value
in byte array@Nonnull public java.util.Optional<java.lang.String> getString()
Value
Optional
of the content of this Value
in String
@Nonnull public java.lang.String getName()
Value
public TextValue copyWith(java.lang.String name)
Value
public void accept(ValueVisitor v)
Value
ValueVisitor
to be able to be traversedpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
TextValue
and
equals
in class java.lang.Object
o
- an object to be tested for equalitytrue
if the other object is "equal to" this object otherwise false
public java.lang.String toString()
toString
in class java.lang.Object