public class GoogleBaseAttributeType
extends java.lang.Object
getInstance(String)
to
convert a string into a GoogleBaseAttributeType.
When not parsing XML streams, always use the constants defined
in this class when referring to a specific type.
Use equality (A.equals(B)) and not identity (A == B) when comparing
types.Modifier and Type | Field and Description |
---|---|
static GoogleBaseAttributeType |
BOOLEAN
Either true or false.
|
static GoogleBaseAttributeType |
DATE
Date for an event, in format YYYY-MM-DD (RFC3339).
|
static GoogleBaseAttributeType |
DATE_TIME
Date and time for an event, in format YYYY-MM-DDThh:mm:ss (RFC3339).
|
static GoogleBaseAttributeType |
DATE_TIME_RANGE
Start and end dates for an event.
|
static GoogleBaseAttributeType |
FLOAT
Numbers with decimal digits.
|
static GoogleBaseAttributeType |
FLOAT_UNIT
Numbers with decimal digits and a string.
|
static GoogleBaseAttributeType |
GROUP
Group of related attributes.
|
static GoogleBaseAttributeType |
INT
Whole number values.
|
static GoogleBaseAttributeType |
INT_UNIT
Whole number value and a string.
|
static GoogleBaseAttributeType |
LOCATION
A location, a string describing the address.
|
static GoogleBaseAttributeType |
NUMBER
Any kind of number.
|
static GoogleBaseAttributeType |
NUMBER_UNIT
A number and a string.
|
static GoogleBaseAttributeType |
REFERENCE
A reference to another Google Base Item.
|
static GoogleBaseAttributeType |
SHIPPING
Shipping information.
|
static GoogleBaseAttributeType |
TAX
Tax information.
|
static GoogleBaseAttributeType |
TEXT
Text values.
|
static GoogleBaseAttributeType |
URL
HTTP URL.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
static GoogleBaseAttributeType |
getInstance(java.lang.String typeName)
Get a type instance.
|
java.lang.String |
getName()
Gets the type name.
|
GoogleBaseAttributeType |
getSupertype()
Gets the supertype or null.
|
int |
hashCode() |
boolean |
isSupertypeOf(GoogleBaseAttributeType subtype)
Checks whether the given type is the same as this type or a subtype.
|
java.lang.String |
toString()
Gets the type name.
|
public static final GoogleBaseAttributeType TEXT
public static final GoogleBaseAttributeType NUMBER
public static final GoogleBaseAttributeType INT
public static final GoogleBaseAttributeType FLOAT
public static final GoogleBaseAttributeType NUMBER_UNIT
public static final GoogleBaseAttributeType INT_UNIT
10 km
)public static final GoogleBaseAttributeType FLOAT_UNIT
1.5 m
public static final GoogleBaseAttributeType DATE_TIME_RANGE
1975-09-25 1975-09-25
DateTimeRange
public static final GoogleBaseAttributeType DATE
public static final GoogleBaseAttributeType DATE_TIME
public static final GoogleBaseAttributeType URL
public static final GoogleBaseAttributeType BOOLEAN
public static final GoogleBaseAttributeType GROUP
public static final GoogleBaseAttributeType SHIPPING
<country>DE</country> <region>Munich</region> <price>12.50 eur</price> <service>Deutsche Post</service>
public static final GoogleBaseAttributeType TAX
<country>DE</country> <region>Munich</region> <rate>12.50 eur</rate> <tax_ship>true</tax_ship>
public static final GoogleBaseAttributeType LOCATION
public static final GoogleBaseAttributeType REFERENCE
public GoogleBaseAttributeType getSupertype()
public java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static GoogleBaseAttributeType getInstance(java.lang.String typeName)
typeName
- name of a type found in a feed. Current version of
the API will always return one of the types listed in this class
but future versions might support new types, so getInstance
accepts any type namenull
if typeName
was nullpublic boolean isSupertypeOf(GoogleBaseAttributeType subtype)
subtype
- subtype
is the same type or a subtype
of the current type