public final class Attributes
extends java.lang.Object
AttributeType
value related functionality.Modifier and Type | Field and Description |
---|---|
static AttributeType<java.lang.Boolean> |
BOOLEAN_TYPE
Boolean Attribute type. |
static AttributeType<java.lang.Byte> |
BYTE_TYPE
Byte Attribute type. |
static AttributeType<java.lang.Character> |
CHARACTER_TYPE
Character Attribute type. |
static AttributeType<java.lang.Double> |
DOUBLE_TYPE
Double Attribute type. |
static AttributeContainer |
EMPTY_ATTRIBUTECONTAINER
An empty AttributeContainer.
|
static AttributeType<java.lang.Float> |
FLOAT_TYPE
Float Attribute type. |
static AttributeType<java.lang.Integer> |
INTEGER_TYPE
Integer Attribute type. |
static AttributeType<java.lang.Long> |
LONG_TYPE
Long Attribute type. |
static AttributeType<java.lang.Object> |
OBJECT_TYPE
Object Attribute type. |
static AttributeType<java.lang.Short> |
SHORT_TYPE
Short Attribute type. |
static AttributeType<java.lang.String> |
STRING_TYPE
String Attribute type. |
Modifier and Type | Method and Description |
---|---|
static AttributeContainer |
emptyAttributeContainer()
Creates an immutable empty attribute container.
|
static NamedAttributeType<java.lang.Boolean> |
newNamedBooleanType(java.lang.String name)
Creates a new attribute type (Boolean).
|
static NamedAttributeType<java.lang.Byte> |
newNamedByteType(java.lang.String name)
Creates a new attribute type (Byte).
|
static NamedAttributeType<java.lang.Character> |
newNamedCharacterType(java.lang.String name)
Creates a new attribute type (String).
|
static NamedAttributeType<java.lang.Double> |
newNamedDoubleType(java.lang.String name)
Creates a new attribute type (Double).
|
static NamedAttributeType<java.lang.Float> |
newNamedFloatType(java.lang.String name)
Creates a new attribute type (Float).
|
static NamedAttributeType<java.lang.Integer> |
newNamedIntegerType(java.lang.String name)
Creates a new attribute type (Integer).
|
static NamedAttributeType<java.lang.Long> |
newNamedLongType(java.lang.String name)
Creates a new attribute type (Long).
|
static NamedAttributeType<java.lang.Object> |
newNamedObjectType(java.lang.String name)
Creates a new attribute type (Object).
|
static NamedAttributeType<java.lang.Short> |
newNamedShortType(java.lang.String name)
Creates a new attribute type (Short).
|
static NamedAttributeType<java.lang.String> |
newNamedStringType(java.lang.String name)
Creates a new attribute type (String).
|
static <T> NamedAttributeType<T> |
newNamedTypeOf(java.lang.String name,
java.lang.Class<T> type)
Creates a new named type of the supplied simple type.
|
static NamedAttributeType<java.lang.Object> |
newNamedUnknownType(java.lang.String name,
java.lang.reflect.Type type)
Creates a new named unknown type.
|
static <T> AttributeType<T> |
newTypeOf(java.lang.Class<T> type)
Creates a new attribute type of the supplied simple type.
|
static AttributeType<java.lang.Object> |
newUnknownType(java.lang.reflect.Type type)
Creates a new unknown attribute type from the supplied type.
|
static java.lang.String |
requireNotEmpty(java.lang.String str)
Ensures the String is not null or empty.
|
static AttributeContainer |
unmodifiableAttributeContainer(AttributeContainer container)
Creates an immutable read-only delegate attribute container for the supplied container.
|
public static final AttributeType<java.lang.Boolean> BOOLEAN_TYPE
Boolean
Attribute type.public static final AttributeType<java.lang.Integer> INTEGER_TYPE
Integer
Attribute type.public static final AttributeType<java.lang.String> STRING_TYPE
String
Attribute type.public static final AttributeType<java.lang.Double> DOUBLE_TYPE
Double
Attribute type.public static final AttributeType<java.lang.Character> CHARACTER_TYPE
Character
Attribute type.public static final AttributeType<java.lang.Long> LONG_TYPE
Long
Attribute type.public static final AttributeType<java.lang.Byte> BYTE_TYPE
Byte
Attribute type.public static final AttributeType<java.lang.Float> FLOAT_TYPE
Float
Attribute type.public static final AttributeType<java.lang.Short> SHORT_TYPE
Short
Attribute type.public static final AttributeType<java.lang.Object> OBJECT_TYPE
Object
Attribute type.public static final AttributeContainer EMPTY_ATTRIBUTECONTAINER
public static AttributeContainer emptyAttributeContainer()
public static NamedAttributeType<java.lang.Boolean> newNamedBooleanType(java.lang.String name)
name
- Name of the attribute type.BOOLEAN_TYPE
public static NamedAttributeType<java.lang.Byte> newNamedByteType(java.lang.String name)
name
- Name of the attribute type.BYTE_TYPE
public static NamedAttributeType<java.lang.Character> newNamedCharacterType(java.lang.String name)
name
- Name of the attribute type.CHARACTER_TYPE
public static NamedAttributeType<java.lang.Double> newNamedDoubleType(java.lang.String name)
name
- Name of the attribute type.DOUBLE_TYPE
public static NamedAttributeType<java.lang.Float> newNamedFloatType(java.lang.String name)
name
- Name of the attribute type.FLOAT_TYPE
public static NamedAttributeType<java.lang.Integer> newNamedIntegerType(java.lang.String name)
name
- Name of the attribute type.INTEGER_TYPE
public static NamedAttributeType<java.lang.Long> newNamedLongType(java.lang.String name)
name
- Name of the attribute type.LONG_TYPE
public static NamedAttributeType<java.lang.Object> newNamedObjectType(java.lang.String name)
name
- Name of attribute type.OBJECT_TYPE
public static NamedAttributeType<java.lang.Short> newNamedShortType(java.lang.String name)
name
- Name of the attribute type.SHORT_TYPE
public static NamedAttributeType<java.lang.String> newNamedStringType(java.lang.String name)
name
- Name of the attribute type.STRING_TYPE
public static <T> NamedAttributeType<T> newNamedTypeOf(java.lang.String name, java.lang.Class<T> type)
name
- Name of the attribute type.type
- Simple type.newTypeOf(Class)
public static NamedAttributeType<java.lang.Object> newNamedUnknownType(java.lang.String name, java.lang.reflect.Type type)
name
- Attribute type name.type
- Unknown type.public static <T> AttributeType<T> newTypeOf(java.lang.Class<T> type)
type
- Simple type.AttributeType
public static AttributeType<java.lang.Object> newUnknownType(java.lang.reflect.Type type)
type
- Unknown type.public static java.lang.String requireNotEmpty(java.lang.String str) throws java.lang.NullPointerException, java.lang.IllegalArgumentException
str
- String to check.java.lang.IllegalArgumentException
- If the string was null or empty.java.lang.NullPointerException
public static AttributeContainer unmodifiableAttributeContainer(AttributeContainer container)
container
- Container to delegate for.