public class GridIntList extends Object implements Message, Externalizable
DIRECT_TYPE_SIZE| Constructor and Description |
|---|
GridIntList() |
GridIntList(int size) |
GridIntList(int[] arr) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int x)
Add element to this array.
|
int[] |
array() |
static GridIntList |
asList(int... vals) |
boolean |
contains(int l) |
GridIntList |
copyWithout(GridIntList l)
Returns (possibly reordered) copy of this list, excluding all elements of given list.
|
short |
directType()
Gets message type.
|
boolean |
equals(Object o) |
byte |
fieldsCount()
Gets fields count.
|
int |
get(int i) |
int |
hashCode() |
boolean |
isEmpty() |
GridIntIterator |
iterator() |
void |
onAckReceived()
Method called when ack message received.
|
void |
readExternal(ObjectInput in) |
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
int |
removeIndex(int i)
Removes element by given index.
|
int |
removeValue(int startIdx,
int val)
Removes value from this list.
|
int |
size() |
GridIntList |
sort()
Sorts this list.
|
String |
toString() |
void |
truncate(int size,
boolean last) |
void |
writeExternal(ObjectOutput out) |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
public GridIntList()
public GridIntList(int size)
size - Size.public GridIntList(int[] arr)
arr - Array.public static GridIntList asList(int... vals)
vals - Values.public void add(int x)
x - Value.public GridIntList copyWithout(GridIntList l)
l - List of elements to remove.l.public int get(int i)
i - Index.public int size()
public boolean isEmpty()
True if this list has no elements.public boolean contains(int l)
l - Element to find.True if found.public void truncate(int size,
boolean last)
size - New size.last - If true the last elements will be removed, otherwise the first.public int removeIndex(int i)
i - Index.public int removeValue(int startIdx,
int val)
startIdx - Index to begin search with.val - Value.-1 otherwise.public int[] array()
public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionpublic GridIntList sort()
copy().sort() if you need a defensive copy.this For chaining.public void onAckReceived()
onAckReceived in interface Messagepublic boolean writeTo(ByteBuffer buf, MessageWriter writer)
public boolean readFrom(ByteBuffer buf, MessageReader reader)
public short directType()
directType in interface Messagepublic byte fieldsCount()
fieldsCount in interface Messagepublic GridIntIterator iterator()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023