deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.commons.types
Enum PrimitiveType

java.lang.Object
  extended by java.lang.Enum<PrimitiveType>
      extended by org.deegree.commons.types.PrimitiveType
All Implemented Interfaces:
Serializable, Comparable<PrimitiveType>

public enum PrimitiveType
extends Enum<PrimitiveType>

Primitive type system for object properties (e.g. for Feature instances).

Based on XML schema types, but stripped down to leave out any distinctions that are not necessary in the feature model.

Version:
$Revision: 22104 $, $Date: 2010-01-21 14:59:23 +0100 (Do, 21 Jan 2010) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Enum Constant Summary
BOOLEAN
          Property value is of class Boolean.
DATE
          Property value is of class Date.
DATE_TIME
          Property value is of class DateTime.
DECIMAL
          Property value is of class BigDecimal.
DOUBLE
          Property value is of class Double (needed because BigDecimal cannot express "NaN", "-INF" and "INF"), which are required by xs:double / xs:float.
INTEGER
          Property value is of class BigInteger.
STRING
          Property value is of class String.
TIME
          Property value is of class Time.
 
Method Summary
static PrimitiveType determinePrimitiveType(Object value)
          Returns the PrimitiveType for the given value.
 Class<?> getValueClass()
          Returns the class that primitive values of this type must have.
static PrimitiveType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PrimitiveType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

STRING

public static final PrimitiveType STRING
Property value is of class String.


BOOLEAN

public static final PrimitiveType BOOLEAN
Property value is of class Boolean.


DECIMAL

public static final PrimitiveType DECIMAL
Property value is of class BigDecimal.


DOUBLE

public static final PrimitiveType DOUBLE
Property value is of class Double (needed because BigDecimal cannot express "NaN", "-INF" and "INF"), which are required by xs:double / xs:float.


INTEGER

public static final PrimitiveType INTEGER
Property value is of class BigInteger.


DATE

public static final PrimitiveType DATE
Property value is of class Date.


DATE_TIME

public static final PrimitiveType DATE_TIME
Property value is of class DateTime.


TIME

public static final PrimitiveType TIME
Property value is of class Time.

Method Detail

values

public static PrimitiveType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PrimitiveType c : PrimitiveType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PrimitiveType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getValueClass

public Class<?> getValueClass()
Returns the class that primitive values of this type must have.

Returns:
the corresponding class for values

determinePrimitiveType

public static PrimitiveType determinePrimitiveType(Object value)
                                            throws IllegalArgumentException
Returns the PrimitiveType for the given value.

Parameters:
value -
Returns:
corresponding PrimitiveType, never null
Throws:
IllegalArgumentException

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>