@Public public class BooleanValue extends Object implements NormalizableKey<BooleanValue>, ResettableValue<BooleanValue>, CopyableValue<BooleanValue>
boolean
.限定符和类型 | 字段和说明 |
---|---|
static BooleanValue |
FALSE |
static BooleanValue |
TRUE |
构造器和说明 |
---|
BooleanValue() |
BooleanValue(boolean value) |
限定符和类型 | 方法和说明 |
---|---|
int |
compareTo(BooleanValue o) |
BooleanValue |
copy()
Performs a deep copy of this object into a new instance.
|
void |
copy(DataInputView source,
DataOutputView target)
Copies the next serialized instance from
source to target . |
void |
copyNormalizedKey(MemorySegment target,
int offset,
int len)
Writes a normalized key for the given record into the target byte array, starting at the
specified position an writing exactly the given number of bytes.
|
void |
copyTo(BooleanValue target)
Performs a deep copy of this object into the
target instance. |
boolean |
equals(Object obj)
Compares the object on equality with another object.
|
boolean |
get() |
int |
getBinaryLength()
Gets the length of the data type when it is serialized, in bytes.
|
int |
getMaxNormalizedKeyLen()
Gets the maximal length of normalized keys that the data type would produce to determine the
order of instances solely by the normalized key.
|
boolean |
getValue() |
int |
hashCode()
All keys must override the hash-code function to generate proper deterministic hash codes,
based on their contents.
|
void |
read(DataInputView in)
Reads the object's internal data from the given data input view.
|
void |
set(boolean value) |
void |
setValue(boolean value) |
void |
setValue(BooleanValue value)
Sets the encapsulated value to another value
|
String |
toString() |
void |
write(DataOutputView out)
Writes the object's internal data to the given data output view.
|
public static final BooleanValue TRUE
public static final BooleanValue FALSE
public boolean get()
public void set(boolean value)
public boolean getValue()
public void setValue(boolean value)
public void setValue(BooleanValue value)
ResettableValue
setValue
在接口中 ResettableValue<BooleanValue>
value
- the new value of the encapsulated valuepublic void write(DataOutputView out) throws IOException
IOReadableWritable
write
在接口中 IOReadableWritable
out
- the output view to receive the data.IOException
- thrown if any error occurs while writing to the output streampublic void read(DataInputView in) throws IOException
IOReadableWritable
read
在接口中 IOReadableWritable
in
- the input view to read the data fromIOException
- thrown if any error occurs while reading from the input streampublic int hashCode()
Key
hashCode
在接口中 Key<BooleanValue>
hashCode
在类中 Object
public boolean equals(Object obj)
Key
equals
在接口中 Key<BooleanValue>
equals
在类中 Object
obj
- The other object to compare against.public int compareTo(BooleanValue o)
compareTo
在接口中 Comparable<BooleanValue>
public int getBinaryLength()
CopyableValue
getBinaryLength
在接口中 CopyableValue<BooleanValue>
-1
, if variable length.public void copyTo(BooleanValue target)
CopyableValue
target
instance.copyTo
在接口中 CopyableValue<BooleanValue>
target
- Object to copy into.public BooleanValue copy()
CopyableValue
This method is useful for generic user-defined functions to clone a CopyableValue
when storing multiple objects. With object reuse a deep copy must be created and type erasure
prevents calling new.
copy
在接口中 CopyableValue<BooleanValue>
public void copy(DataInputView source, DataOutputView target) throws IOException
CopyableValue
source
to target
.
This method is equivalent to calling IOReadableWritable.read(DataInputView)
followed by IOReadableWritable.write(DataOutputView)
but does not require
intermediate deserialization.
copy
在接口中 CopyableValue<BooleanValue>
source
- Data source for serialized instance.target
- Data target for serialized instance.IOException
IOReadableWritable
public int getMaxNormalizedKeyLen()
NormalizableKey
Integer
.MAX_VALUE is interpreted as infinite.
For example, 32 bit integers return four, while Strings (potentially unlimited in length)
return Integer
.MAX_VALUE.
getMaxNormalizedKeyLen
在接口中 NormalizableKey<BooleanValue>
public void copyNormalizedKey(MemorySegment target, int offset, int len)
NormalizableKey
int byteI = bytes[i] & 0xFF;
If the meaningful part of the normalized key takes less than the given number of bytes,
then it must be padded. Padding is typically required for variable length data types, such as
strings. The padding uses a special character, either 0
or 0xff
, depending on
whether shorter values are sorted to the beginning or the end.
copyNormalizedKey
在接口中 NormalizableKey<BooleanValue>
target
- The memory segment to put the normalized key bytes into.offset
- The offset in the byte array where the normalized key's bytes should start.len
- The number of bytes to put.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.