com.askgeo.flt.base
Enum FieldType

java.lang.Object
  extended by java.lang.Enum<FieldType>
      extended by com.askgeo.flt.base.FieldType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FieldType>

public enum FieldType
extends java.lang.Enum<FieldType>

Many of the accessors on the map query result classes return String representations of the fields, even if the underlying data might be better represented by a different type. All fields returned in this manner are enumerated by other enums that implement the DataFieldInterface. That interface includes an accessor that returns the FieldType of the field in question.

In most cases, users of AskGeo will not need to concern themselves with this, as typed accessors have been provided that allow direct access to the metadata fields without the use of the DataFieldInterface.

This enum encodes the logical type of the enumerated metadata fields.


Enum Constant Summary
BOOLEAN
          Best represented by a Java boolean type.
FLOAT
          Best represented by a Java float type.
INTEGER
          Best represented by a Java int type.
STRING
          Best represented by a Java String type.
 
Method Summary
 java.lang.String javaName()
          The java type name for the logical type represented by this enumerated value.
static FieldType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FieldType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, 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 FieldType STRING
Best represented by a Java String type.


BOOLEAN

public static final FieldType BOOLEAN
Best represented by a Java boolean type.


INTEGER

public static final FieldType INTEGER
Best represented by a Java int type.


FLOAT

public static final FieldType FLOAT
Best represented by a Java float type.

Method Detail

values

public static FieldType[] 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 (FieldType c : FieldType.values())
    System.out.println(c);

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

valueOf

public static FieldType valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

javaName

public java.lang.String javaName()
The java type name for the logical type represented by this enumerated value.

Returns:
the java type name as a String.


Copyright © 2012 Vector Magic, Inc.