public interface ListNumber extends CollectionNumber
Modifier and Type | Method and Description |
---|---|
byte |
getByte(int index)
Returns the element at the specified position in this list casted to a byte.
|
double |
getDouble(int index)
Returns the element at the specified position in this list casted to a double.
|
float |
getFloat(int index)
Returns the element at the specified position in this list casted to a float.
|
int |
getInt(int index)
Returns the element at the specified position in this list casted to an int.
|
long |
getLong(int index)
Returns the element at the specified position in this list casted to a long.
|
short |
getShort(int index)
Returns the element at the specified position in this list casted to a short.
|
void |
setByte(int index,
byte value)
Changes the element at the specified position, casting to the internal
representation.
|
void |
setDouble(int index,
double value)
Changes the element at the specified position, casting to the internal
representation.
|
void |
setFloat(int index,
float value)
Changes the element at the specified position, casting to the internal
representation.
|
void |
setInt(int index,
int value)
Changes the element at the specified position, casting to the internal
representation.
|
void |
setLong(int index,
long value)
Changes the element at the specified position, casting to the internal
representation.
|
void |
setShort(int index,
short value)
Changes the element at the specified position, casting to the internal
representation.
|
iterator, size
double getDouble(int index)
index
- position of the element to returnIndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())float getFloat(int index)
index
- position of the element to returnIndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())long getLong(int index)
index
- position of the element to returnIndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())int getInt(int index)
index
- position of the element to returnIndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())short getShort(int index)
index
- position of the element to returnIndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())byte getByte(int index)
index
- position of the element to returnIndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())void setDouble(int index, double value)
index
- position of the element to changevalue
- the new valueIndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())void setFloat(int index, float value)
index
- position of the element to changevalue
- the new valueIndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())void setLong(int index, long value)
index
- position of the element to changevalue
- the new valueIndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())void setInt(int index, int value)
index
- position of the element to changevalue
- the new valueIndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())void setShort(int index, short value)
index
- position of the element to changevalue
- the new valueIndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())void setByte(int index, byte value)
index
- position of the element to changevalue
- the new valueIndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())Copyright © 2015. All rights reserved.