public class PropertyData<T> extends Object
PropertyData represents Property Type @see JmxConstants.PROPERTY_TYPE. It is a codec for the
CompositeData representing a Property with an associated Type and Value.
| Modifier and Type | Method and Description |
|---|---|
static <T> PropertyData<T> |
from(CompositeData compositeData)
Constructs a
PropertyData object from the given CompositeData |
String |
getEncodedType() |
String |
getEncodedValue() |
String |
getKey() |
T |
getValue() |
boolean |
isEncodingPrimitive() |
static PropertyData<Boolean> |
newInstance(String key,
boolean value)
Static factory method for
PropertyData instance which preserves encoded type
information for primitive boolean type |
static PropertyData<Byte> |
newInstance(String key,
byte value)
Static factory method for
PropertyData instance which preserves encoded type
information for primitive byte type |
static PropertyData<Character> |
newInstance(String key,
char value)
Static factory method for
PropertyData instance which preserves encoded type
information for primitive char type |
static PropertyData<Double> |
newInstance(String key,
double value)
Static factory method for
PropertyData instance which preserves encoded type
information for primitive double type |
static PropertyData<Float> |
newInstance(String key,
float value)
Static factory method for
PropertyData instance which preserves encoded type
information for primitive float type |
static PropertyData<Integer> |
newInstance(String key,
int value)
Static factory method for
PropertyData instance which preserves encoded type
information for primitive int type |
static PropertyData<Long> |
newInstance(String key,
long value)
Static factory method for
PropertyData instance which preserves encoded type
information for primitive long type |
static <T> PropertyData<T> |
newInstance(String key,
T value)
Static factory method for
PropertyData instance parameterized by value's type |
CompositeData |
toCompositeData()
Returns CompositeData representing a Property typed by
JmxConstants.PROPERTY_TYPE. |
public static <T> PropertyData<T> newInstance(String key, T value) throws IllegalArgumentException
PropertyData instance parameterized by value's typeT - key - value - an instance of JmxConstants.SCALARIllegalArgumentException - if key or value are null or value's type cannot be encodedpublic static PropertyData<Integer> newInstance(String key, int value) throws IllegalArgumentException
PropertyData instance which preserves encoded type
information for primitive int typekey - value - IllegalArgumentException - if key or value are null or value's type cannot be encodedpublic static PropertyData<Long> newInstance(String key, long value) throws IllegalArgumentException
PropertyData instance which preserves encoded type
information for primitive long typekey - value - IllegalArgumentException - if key or value are null or value's type cannot be encodedpublic static PropertyData<Float> newInstance(String key, float value) throws IllegalArgumentException
PropertyData instance which preserves encoded type
information for primitive float typekey - value - IllegalArgumentException - if key or value are null or value's type cannot be encodedpublic static PropertyData<Double> newInstance(String key, double value) throws IllegalArgumentException
PropertyData instance which preserves encoded type
information for primitive double typekey - value - IllegalArgumentException - if key or value are null or value's type cannot be encodedpublic static PropertyData<Byte> newInstance(String key, byte value) throws IllegalArgumentException
PropertyData instance which preserves encoded type
information for primitive byte typekey - value - IllegalArgumentException - if key or value are null or value's type cannot be encodedpublic static PropertyData<Character> newInstance(String key, char value) throws IllegalArgumentException
PropertyData instance which preserves encoded type
information for primitive char typekey - value - IllegalArgumentException - if key or value are null or value's type cannot be encodedpublic static PropertyData<Boolean> newInstance(String key, boolean value) throws IllegalArgumentException
PropertyData instance which preserves encoded type
information for primitive boolean typekey - value - IllegalArgumentException - if key or value are null or value's type cannot be encodedpublic CompositeData toCompositeData()
JmxConstants.PROPERTY_TYPE.public static <T> PropertyData<T> from(CompositeData compositeData) throws IllegalArgumentException
PropertyData object from the given CompositeDatacompositeData - IlleglArgumentException - if compositeData is null or not of type JmxConstants.PROPERTY_TYPEIllegalArgumentExceptionpublic String getKey()
public T getValue()
public String getEncodedType()
public String getEncodedValue()
public boolean isEncodingPrimitive()
Copyright © 2015 JBoss by Red Hat. All rights reserved.