Class AttributeType
java.lang.Object
com.vividsolutions.jump.feature.AttributeType
- All Implemented Interfaces:
Serializable
Types of attributes
- Since:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeTypestatic final AttributeType -
Constructor Summary
ConstructorsModifierConstructorDescriptionAttributeType(String name) Deprecated.protectedAttributeType(String name, Class<?> javaClass) -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<AttributeType> allTypes()static booleanareCompatibleTypes(AttributeType attrType1, AttributeType attrType2) Checks if two attribute types are compatible.static Collection<AttributeType> booleangetName()static booleanisBoolean(AttributeType type) Checks if an attribute type is assignable to a booleanstatic booleanisDate(AttributeType type) Checks if an attribute type is a datestatic booleanisNumeric(AttributeType type) Checks if an attribute type is numericstatic booleanChecks if an attribute type is numeric without any decimalstatic booleanisString(AttributeType type) Checks if an attribute type is assignable to a Stringstatic AttributeTypetoAttributeType(Class<?> javaClass) Gets the first attribute type related with a given class.static AttributeTypetoAttributeType(String name) Converts a type name to an AttributeType.Class<?> toString()
-
Field Details
-
STRING
-
CHAR
-
VARCHAR
-
LONGVARCHAR
-
TEXT
-
BOOLEAN
-
BIT
-
SMALLINT
-
TINYINT
-
INTEGER
-
LONG
-
BIGINT
-
DECIMAL
-
NUMERIC
-
BIGDECIMAL
-
FLOAT
-
DOUBLE
-
REAL
-
DATE
-
TIME
-
TIMESTAMP
-
GEOMETRY
-
OBJECT
-
-
Constructor Details
-
AttributeType
-
AttributeType
Deprecated.- Parameters:
name- of this new AttributeType
-
-
Method Details
-
allTypes
- Returns:
- all AttributeTypes defined in that class.
-
basicTypes
- Returns:
- AttributeTypes currently used through OpenJUMP user interface
-
toString
-
toAttributeType
Converts a type name to an AttributeType.- Parameters:
name- the name of the AttributeType to retrieve- Returns:
- the corresponding AttributeType
-
toJavaClass
- Returns:
- the java class used to store attributes of this type.
-
equals
-
toAttributeType
Gets the first attribute type related with a given class. Tries the basic types first.- Parameters:
javaClass- the javaClass to retrieve- Returns:
- an AttributeType based on this java class
-
getName
- Returns:
- the name of this AtributeType.
-
areCompatibleTypes
Checks if two attribute types are compatible. -
isNumeric
Checks if an attribute type is numeric- Parameters:
type- the AttributeType- Returns:
- true if type uses a java class implementing Number to store attribute values.
-
isNumericWithoutDecimal
Checks if an attribute type is numeric without any decimal- Parameters:
type- the AttributeType- Returns:
- true if type uses an Integer or a Long to store attribute values
-
isDate
Checks if an attribute type is a date- Parameters:
type- the AttributeType- Returns:
- true if type uses a java.util.Date to store attribute values
-
isString
Checks if an attribute type is assignable to a String- Parameters:
type- the AttributeType- Returns:
- true if type uses a java String to store attribute values
-
isBoolean
Checks if an attribute type is assignable to a boolean- Parameters:
type- the AttributeType- Returns:
- true if type uses a java Boolean to store attribute values.
-