public final class AttributeValue extends Object implements Comparable<AttributeValue>, Serializable
| 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.
|
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 |
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 AttributeValue fromString(String string)
string - the attribute value string (must not be null)public static AttributeValue fromBytes(byte[] bytes)
bytes - the bytes to read (must not be null)public 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 boolean equals(Object obj)
Copyright © 2017 JBoss by Red Hat. All rights reserved.