public abstract class AttributeValue extends Object implements Comparable<AttributeValue>, Serializable
| Modifier and Type | Field and Description |
|---|---|
static org.wildfly.discovery.BooleanAttributeValue |
FALSE
The "false" boolean attribute value.
|
static org.wildfly.discovery.BooleanAttributeValue |
TRUE
The "true" boolean attribute value.
|
| Modifier and Type | Method and Description |
|---|---|
int |
asInt()
Get the value as an integer, throwing an exception if it is not numeric.
|
int |
compareTo(AttributeValue other)
Compare this value to another.
|
abstract boolean |
equals(AttributeValue obj)
Determine if this attribute value is equal to another.
|
abstract boolean |
equals(Object obj)
Determine if this attribute value is equal to another.
|
static AttributeValue |
fromBytes(byte[] bytes)
Create an attribute value from a byte sequence.
|
static AttributeValue |
fromInt(int value)
Create an attribute value from an integer.
|
static AttributeValue |
fromString(String string)
Create an attribute value from a string.
|
boolean |
isBoolean()
Determine if this value is a boolean value.
|
boolean |
isNumeric()
Determine if this value is numeric.
|
boolean |
isOpaque()
Determine if this value is opaque (binary).
|
boolean |
isString()
Determine if this value is a text string.
|
String |
toString()
Get a string representation of this attribute value.
|
public static final org.wildfly.discovery.BooleanAttributeValue TRUE
public static final org.wildfly.discovery.BooleanAttributeValue FALSE
public static AttributeValue fromString(String string)
true from isString().string - the attribute value string (must not be null)public static AttributeValue fromBytes(byte[] bytes)
true from isOpaque().bytes - the bytes to read (must not be null)public static AttributeValue fromInt(int value)
true from isNumeric().value - the value to usepublic boolean isBoolean()
true if the value is a boolean, false otherwisepublic boolean isNumeric()
true if the value is numeric, false otherwisepublic boolean isOpaque()
true if the value is opaque, false otherwisepublic boolean isString()
true if the value is a string, false otherwisepublic int asInt()
throws IllegalArgumentException
IllegalArgumentException - if the value is not numericpublic int compareTo(AttributeValue other)
compareTo in interface Comparable<AttributeValue>other - the other valuepublic abstract boolean equals(Object obj)
public abstract boolean equals(AttributeValue obj)
obj - the other objecttrue if the objects are equal, false otherwiseCopyright © 2017 JBoss by Red Hat. All rights reserved.