public final class Type<T>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Type.Enum |
Modifier and Type | Field and Description |
---|---|
static Type<java.lang.Boolean> |
BOOL
The
Boolean type. |
static Type<byte[]> |
BYTES
The binary type.
|
static Type<java.lang.Character> |
CHAR
The
Character type. |
static Type<java.lang.Double> |
DOUBLE
The
Double type. |
static Type<java.lang.Integer> |
INT
The
Integer type. |
static Type<java.lang.Long> |
LONG
The
Long type. |
static Type<java.lang.String> |
STRING
The
String type. |
Modifier and Type | Method and Description |
---|---|
Type.Enum |
asEnum() |
boolean |
equals(java.lang.Object o) |
static boolean |
equals(java.lang.Object a,
java.lang.Object b)
Compares to cell values for equality.
|
static <T> Type<T> |
forJdkType(java.lang.Class<? extends T> clazz)
Return the Terracotta Store type corresponding to the supplied JDK type.
|
static Type<?> |
fromOrdinal(int ordinal) |
java.lang.Class<T> |
getJDKType()
Returns the corresponding JDK type for this Terracotta Store type.
|
int |
hashCode() |
java.lang.String |
toString() |
public static final Type<java.lang.Boolean> BOOL
Boolean
type.public static final Type<java.lang.Character> CHAR
Character
type.public static final Type<java.lang.Integer> INT
Integer
type.public static final Type<java.lang.Long> LONG
Long
type.public static final Type<java.lang.Double> DOUBLE
Double
type.public static final Type<java.lang.String> STRING
String
type.public static final Type<byte[]> BYTES
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Class<T> getJDKType()
public Type.Enum asEnum()
public static <T> Type<T> forJdkType(java.lang.Class<? extends T> clazz)
If there is no type corresponding to the supplied JDK type then
null
will be returned.
T
- JDK type corresponding to the Terracotta Store typeclazz
- a JDK typepublic static Type<?> fromOrdinal(int ordinal)
public static boolean equals(java.lang.Object a, java.lang.Object b)
Cell value equality follows conventional Java behavior, except for BYTES
cells which are compared using
Arrays.equals(byte[], byte[])
.
a
- first cell valueb
- second cell valuetrue
if the cell values are equalpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object