- java.lang.Object
-
- org.jgrapht.nio.DefaultAttribute<T>
-
- Type Parameters:
T- the underlying type
- All Implemented Interfaces:
Serializable,Attribute
public class DefaultAttribute<T> extends Object implements Attribute, Serializable
Default implementation of an attribute.- Author:
- Dimitrios Michail
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultAttribute(T value, AttributeType type)Create a new attribute
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AttributecreateAttribute(Boolean value)Create a boolean attributestatic AttributecreateAttribute(Double value)Create a double attributestatic AttributecreateAttribute(Float value)Create a float attributestatic AttributecreateAttribute(Integer value)Create an integer attributestatic AttributecreateAttribute(Long value)Create a long attributestatic AttributecreateAttribute(String value)Create a string attributebooleanequals(Object obj)AttributeTypegetType()Get the type of the attributeStringgetValue()Get the string value of the attributeinthashCode()StringtoString()
-
-
-
Field Detail
-
NULL
public static final Attribute NULL
The null attribute.
-
-
Constructor Detail
-
DefaultAttribute
public DefaultAttribute(T value, AttributeType type)
Create a new attribute- Parameters:
value- the valuetype- the type
-
-
Method Detail
-
getValue
public String getValue()
Get the string value of the attribute
-
getType
public AttributeType getType()
Get the type of the attribute
-
createAttribute
public static Attribute createAttribute(Boolean value)
Create a boolean attribute- Parameters:
value- the value- Returns:
- the attribute
-
createAttribute
public static Attribute createAttribute(Integer value)
Create an integer attribute- Parameters:
value- the value- Returns:
- the attribute
-
createAttribute
public static Attribute createAttribute(Long value)
Create a long attribute- Parameters:
value- the value- Returns:
- the attribute
-
createAttribute
public static Attribute createAttribute(Float value)
Create a float attribute- Parameters:
value- the value- Returns:
- the attribute
-
createAttribute
public static Attribute createAttribute(Double value)
Create a double attribute- Parameters:
value- the value- Returns:
- the attribute
-
createAttribute
public static Attribute createAttribute(String value)
Create a string attribute- Parameters:
value- the value- Returns:
- the attribute
-
-