public class FloatValueArray extends Object implements ValueArray<org.apache.flink.types.FloatValue>
FloatValue.| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_CAPACITY_IN_BYTES |
protected static int |
ELEMENT_LENGTH_IN_BYTES |
| Constructor and Description |
|---|
FloatValueArray()
Initializes an expandable array with default capacity.
|
FloatValueArray(int bytes)
Initializes a fixed-size array with the provided number of floats.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(org.apache.flink.types.FloatValue value)
Appends the value to this array if and only if the array capacity would
not be exceeded.
|
boolean |
addAll(ValueArray<org.apache.flink.types.FloatValue> other)
Appends all of the values in the specified array to the end of this
array.
|
void |
clear()
Resets the array to the empty state.
|
int |
compareTo(ValueArray<org.apache.flink.types.FloatValue> o) |
ValueArray<org.apache.flink.types.FloatValue> |
copy() |
void |
copy(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target) |
protected static void |
copyInternal(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target) |
void |
copyNormalizedKey(org.apache.flink.core.memory.MemorySegment target,
int offset,
int len) |
void |
copyTo(ValueArray<org.apache.flink.types.FloatValue> target) |
boolean |
equals(Object obj) |
int |
getBinaryLength() |
int |
getMaxNormalizedKeyLen() |
int |
hashCode() |
boolean |
isFull()
An bounded array fills when the allocated capacity has been fully used.
|
Iterator<org.apache.flink.types.FloatValue> |
iterator() |
void |
mark()
Saves the array index, which can be restored by calling
reset(). |
void |
read(org.apache.flink.core.memory.DataInputView in) |
void |
reset()
Restores the array index to when
mark() was last called. |
void |
setValue(ValueArray<org.apache.flink.types.FloatValue> value) |
int |
size()
Returns the number of elements stored in the array.
|
String |
toString() |
void |
write(org.apache.flink.core.memory.DataOutputView out) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorprotected static final int ELEMENT_LENGTH_IN_BYTES
protected static final int DEFAULT_CAPACITY_IN_BYTES
public FloatValueArray()
public FloatValueArray(int bytes)
bytes - number of bytes of the encapsulated arraypublic Iterator<org.apache.flink.types.FloatValue> iterator()
public void write(org.apache.flink.core.memory.DataOutputView out)
throws IOException
write in interface org.apache.flink.core.io.IOReadableWritableIOExceptionpublic void read(org.apache.flink.core.memory.DataInputView in)
throws IOException
read in interface org.apache.flink.core.io.IOReadableWritableIOExceptionpublic int getMaxNormalizedKeyLen()
getMaxNormalizedKeyLen in interface org.apache.flink.types.NormalizableKey<ValueArray<org.apache.flink.types.FloatValue>>public void copyNormalizedKey(org.apache.flink.core.memory.MemorySegment target,
int offset,
int len)
copyNormalizedKey in interface org.apache.flink.types.NormalizableKey<ValueArray<org.apache.flink.types.FloatValue>>public int compareTo(ValueArray<org.apache.flink.types.FloatValue> o)
compareTo in interface Comparable<ValueArray<org.apache.flink.types.FloatValue>>public int hashCode()
hashCode in interface org.apache.flink.types.Key<ValueArray<org.apache.flink.types.FloatValue>>hashCode in class Objectpublic boolean equals(Object obj)
equals in interface org.apache.flink.types.Key<ValueArray<org.apache.flink.types.FloatValue>>equals in class Objectpublic void setValue(ValueArray<org.apache.flink.types.FloatValue> value)
setValue in interface org.apache.flink.types.ResettableValue<ValueArray<org.apache.flink.types.FloatValue>>public int getBinaryLength()
getBinaryLength in interface org.apache.flink.types.CopyableValue<ValueArray<org.apache.flink.types.FloatValue>>public void copyTo(ValueArray<org.apache.flink.types.FloatValue> target)
copyTo in interface org.apache.flink.types.CopyableValue<ValueArray<org.apache.flink.types.FloatValue>>public ValueArray<org.apache.flink.types.FloatValue> copy()
copy in interface org.apache.flink.types.CopyableValue<ValueArray<org.apache.flink.types.FloatValue>>public void copy(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target)
throws IOException
copy in interface org.apache.flink.types.CopyableValue<ValueArray<org.apache.flink.types.FloatValue>>IOExceptionprotected static void copyInternal(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target)
throws IOException
IOExceptionpublic int size()
ValueArraysize in interface ValueArray<org.apache.flink.types.FloatValue>public boolean isFull()
ValueArrayisFull in interface ValueArray<org.apache.flink.types.FloatValue>public boolean add(org.apache.flink.types.FloatValue value)
ValueArrayadd in interface ValueArray<org.apache.flink.types.FloatValue>value - the value to add to this arraypublic boolean addAll(ValueArray<org.apache.flink.types.FloatValue> other)
ValueArrayaddAll in interface ValueArray<org.apache.flink.types.FloatValue>other - array containing values to be added to this arraypublic void clear()
ValueArrayThis may reset the ValueArray.mark() in order to allow arrays be shrunk.
clear in interface ValueArray<org.apache.flink.types.FloatValue>public void mark()
ValueArrayreset().
This is not serialized and is not part of the contract for
Key.equals(Object).
mark in interface ValueArray<org.apache.flink.types.FloatValue>public void reset()
ValueArraymark() was last called.reset in interface ValueArray<org.apache.flink.types.FloatValue>Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.