public class BooleanType extends DataType<java.lang.Boolean> implements DataTypeFactory, Streamer<java.lang.Boolean>, FixedWidthType
Modifier and Type | Field and Description |
---|---|
static int |
ID |
static BooleanType |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
int |
compareValueTo(java.lang.Boolean val1,
java.lang.Boolean val2) |
DataType<?> |
create() |
int |
fixedSize()
The fixed amount of memory a value object instance of type t requires.
|
java.lang.String |
getName() |
int |
id() |
java.lang.Boolean |
readValueFrom(org.elasticsearch.common.io.stream.StreamInput in) |
Streamer<?> |
streamer() |
java.lang.Boolean |
value(java.lang.Object value) |
void |
writeValueTo(org.elasticsearch.common.io.stream.StreamOutput out,
java.lang.Object v) |
public static final int ID
public static final BooleanType INSTANCE
public java.lang.String getName()
public java.lang.Boolean value(java.lang.Object value)
public int compareValueTo(java.lang.Boolean val1, java.lang.Boolean val2)
compareValueTo
in class DataType<java.lang.Boolean>
public DataType<?> create()
create
in interface DataTypeFactory
public java.lang.Boolean readValueFrom(org.elasticsearch.common.io.stream.StreamInput in) throws java.io.IOException
readValueFrom
in interface Streamer<java.lang.Boolean>
java.io.IOException
public void writeValueTo(org.elasticsearch.common.io.stream.StreamOutput out, java.lang.Object v) throws java.io.IOException
writeValueTo
in interface Streamer<java.lang.Boolean>
java.io.IOException
public int fixedSize()
FixedWidthType
Implementations here may not be 100% accurate because sizes may vary between JVM implementations and then there is also stuff like padding and other JVM magic.
See also: https://blogs.oracle.com/jrose/entry/fixnums_in_the_vm http://www.javaworld.com/article/2077496/testing-debugging/java-tip-130--do-you-know-your-data-size-.html
fixedSize
in interface FixedWidthType