|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<FieldUnit> com.askgeo.dbl.base.FieldUnit
public enum FieldUnit
The various map classes return result classes when queried that contain metadata about the queried shape. The metadata fields that are returned by a given map class are enumerated in one or more enums that implement the DataFieldInterface. That interface includes an accessor that returns the FieldUnit of the field in question. The unit is a logical unit, such as "people", "dollars", and "percent".
This class enumerates the units used by the various AskGeo maps. All units are annotated with a human readable name (e.g, "kilometers" or "degrees"), and type (as specified by providing a FieldType e.g., FieldType.STRING or FieldType.FLOAT).
Enum Constant Summary | |
---|---|
DEGREES
Angular degrees, as in the latitude or longitude of a location. |
|
DOLLARS
US dollars, mostly in 2010 terms. |
|
GINI_INDEX
The Gini index of income inequality. |
|
HOUSEHOLDS
A household is a group of people living together. |
|
HOUSING_UNITS
A housing unit is one apartment, house, etc., that contains one household. |
|
KILOMETERS
Kilometers of distance, in our case reporting how far from a query point to the shape it was matched with. |
|
MILLION_DOLLARS
Millions of US dollars, mostly in 2010 terms. |
|
MILLISECONDS
Milliseconds, in our case describing the offset between UTC and local time for a given time zone. |
|
NONE_BOOLEAN
Unitless but of type boolean. |
|
NONE_INTEGER
Unitless but of type int. |
|
NONE_STRING
Unitless but of type String. |
|
PEOPLE
A count of the number of people in some category. |
|
PEOPLE_PER_SQUARE_MILE
Number of people per square mile, as reported by the US Census for various statistical and political areas. |
|
PERCENT
A percentage, as in the percentage of people in a category as a percentage of all people. |
|
ROOMS
The number of rooms in a housing unit. |
|
SQUARE_METERS
Square meters of area, as for example with a state or county. |
|
SQUARE_MILES
Square miles of area, as for example with a state or county. |
|
YEARS
Typically this is used to report ages of people. |
Method Summary | |
---|---|
FieldType |
fieldType()
Returns the FieldType corresponding to this FieldUnit. |
java.lang.String |
readableName()
Returns a human readable name for the unit (e.g, "kilometers" or "degrees"). |
static FieldUnit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static FieldUnit[] |
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 |
---|
public static final FieldUnit NONE_STRING
public static final FieldUnit NONE_INTEGER
public static final FieldUnit NONE_BOOLEAN
public static final FieldUnit PEOPLE
public static final FieldUnit PERCENT
public static final FieldUnit DOLLARS
public static final FieldUnit MILLION_DOLLARS
public static final FieldUnit HOUSING_UNITS
public static final FieldUnit HOUSEHOLDS
public static final FieldUnit YEARS
public static final FieldUnit ROOMS
public static final FieldUnit GINI_INDEX
public static final FieldUnit DEGREES
public static final FieldUnit MILLISECONDS
public static final FieldUnit KILOMETERS
public static final FieldUnit PEOPLE_PER_SQUARE_MILE
public static final FieldUnit SQUARE_MILES
public static final FieldUnit SQUARE_METERS
Method Detail |
---|
public static FieldUnit[] values()
for (FieldUnit c : FieldUnit.values()) System.out.println(c);
public static FieldUnit valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic FieldType fieldType()
public java.lang.String readableName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |