public interface GettersAndSetters
The matrix will try to convert its content to the desired format as good as possible. For example, a Matrix with String entries will try to parse each String to a Double when you invoke getDoubleValue(). Note, that there will be no exception if the entry cannot be converted. Instead, the result will be either null, 0, false or Double.NaN depending on the method.
| Modifier and Type | Method and Description |
|---|---|
BigDecimal |
getAsBigDecimal(long... coordinates) |
BigInteger |
getAsBigInteger(long... coordinates) |
boolean |
getAsBoolean(long... coordinates)
Returns a byte representation of an entry in the matrix.
|
byte |
getAsByte(long... coordinates)
Returns a byte representation of an entry in the matrix.
|
byte[] |
getAsByteArray(long... coordinates)
Returns a byte array representation of an entry in the matrix.
|
char |
getAsChar(long... coordinates)
Returns a char representation of an entry in the matrix.
|
Date |
getAsDate(long... coordinates)
Returns a Date representation of an entry in the matrix.
|
double |
getAsDouble(long... coordinates)
Returns a double representation of an entry in the matrix.
|
float |
getAsFloat(long... coordinates)
Returns a float representation of an entry in the matrix.
|
int |
getAsInt(long... coordinates)
Returns an int representation of an entry in the matrix.
|
long |
getAsLong(long... coordinates)
Returns a long representation of an entry in the matrix.
|
Matrix |
getAsMatrix(long... coordinates) |
Object |
getAsObject(long... coordinates)
Returns a raw entry in the matrix as it is stored.
|
short |
getAsShort(long... coordinates)
Returns a short representation of an entry in the matrix.
|
String |
getAsString(long... coordinates)
Returns a String representation of an entry in the matrix.
|
Object |
getPreferredObject(long... coordinates)
Returns a representation of the entry in the matrix that reflects the
true object best.
|
void |
setAsBigDecimal(BigDecimal value,
long... coordinates) |
void |
setAsBigInteger(BigInteger value,
long... coordinates) |
void |
setAsBoolean(boolean value,
long... coordinates)
Sets an entry in the matrix to a boolean value.
|
void |
setAsByte(byte value,
long... coordinates)
Sets an entry in the matrix to a byte value.
|
void |
setAsByteArray(byte[] value,
long... coordinates)
Sets an entry in the matrix to a byte array.
|
void |
setAsChar(char value,
long... coordinates)
Sets an entry in the matrix to a char value.
|
void |
setAsDate(Date date,
long... coordinates)
Sets an entry in the matrix to a Date value.
|
void |
setAsDouble(double value,
long... coordinates)
Sets an entry in the matrix to a double value.
|
void |
setAsFloat(float value,
long... coordinates)
Sets an entry in the matrix to a float value.
|
void |
setAsInt(int value,
long... coordinates)
Sets an entry in the matrix to an int value.
|
void |
setAsLong(long value,
long... coordinates)
Sets an entry in the matrix to a long value.
|
void |
setAsMatrix(Matrix m,
long... coordinates) |
void |
setAsObject(Object o,
long... coordinates)
Sets an entry in the matrix to an object.
|
void |
setAsShort(short value,
long... coordinates)
Sets an entry in the matrix to a short value.
|
void |
setAsString(String string,
long... coordinates)
Sets an entry in the matrix to a String value.
|
BigDecimal[][] |
toBigDecimalArray() |
BigInteger[][] |
toBigIntegerArray() |
boolean[][] |
toBooleanArray()
Converts the content of a matrix into a 2-dimensional array of boolean
values.
|
byte[][] |
toByteArray()
Converts the content of a matrix into a 2-dimensional array of byte
values.
|
char[][] |
toCharArray()
Converts the content of a matrix into a 2-dimensional array of char
values.
|
Date[][] |
toDateArray()
Converts the content of a matrix into a 2-dimensional array of Date
values.
|
double[][] |
toDoubleArray()
Converts the content of a matrix into a 2-dimensional array of double
values.
|
float[][] |
toFloatArray()
Converts the content of a matrix into a 2-dimensional array of float
values.
|
int[][] |
toIntArray()
Converts the content of a matrix into a 2-dimensional array of int
values.
|
long[][] |
toLongArray()
Converts the content of a matrix into a 2-dimensional array of long
values.
|
Object[][] |
toObjectArray()
Converts the content of a matrix into a 2-dimensional array of Objects.
|
short[][] |
toShortArray()
Converts the content of a matrix into a 2-dimensional array of short
values.
|
String[][] |
toStringArray()
Converts the content of a matrix into a 2-dimensional array of Strings.
|
double getAsDouble(long... coordinates)
coordinates - location of the entryvoid setAsDouble(double value,
long... coordinates)
value - double valuecoordinates - location of the entry @Object getAsObject(long... coordinates)
coordinates - location of the entryvoid setAsObject(Object o, long... coordinates)
o - the object to storecoordinates - location of the entry @String getAsString(long... coordinates)
coordinates - location of the entryvoid setAsString(String string, long... coordinates)
value - String valuecoordinates - location of the entry @double[][] toDoubleArray()
byte getAsByte(long... coordinates)
coordinates - location of the entrybyte[] getAsByteArray(long... coordinates)
coordinates - location of the entryvoid setAsByte(byte value,
long... coordinates)
value - byte valuecoordinates - location of the entry @void setAsByteArray(byte[] value,
long... coordinates)
value - byte arraycoordinates - location of the entry @boolean[][] toBooleanArray()
BigDecimal[][] toBigDecimalArray()
BigInteger[][] toBigIntegerArray()
byte[][] toByteArray()
boolean getAsBoolean(long... coordinates)
coordinates - location of the entryBigInteger getAsBigInteger(long... coordinates)
BigDecimal getAsBigDecimal(long... coordinates)
void setAsBoolean(boolean value,
long... coordinates)
value - boolean valuecoordinates - location of the entry @void setAsBigInteger(BigInteger value, long... coordinates)
void setAsBigDecimal(BigDecimal value, long... coordinates)
char getAsChar(long... coordinates)
coordinates - location of the entryvoid setAsChar(char value,
long... coordinates)
value - char valuecoordinates - location of the entry @char[][] toCharArray()
Date getAsDate(long... coordinates)
coordinates - location of the entryvoid setAsDate(Date date, long... coordinates)
value - Date object to storecoordinates - location of the entry @Date[][] toDateArray()
float getAsFloat(long... coordinates)
coordinates - location of the entryvoid setAsFloat(float value,
long... coordinates)
value - float valuecoordinates - location of the entry @float[][] toFloatArray()
int getAsInt(long... coordinates)
coordinates - location of the entryvoid setAsInt(int value,
long... coordinates)
value - int valuecoordinates - location of the entry @int[][] toIntArray()
long getAsLong(long... coordinates)
coordinates - location of the entryvoid setAsLong(long value,
long... coordinates)
value - long valuecoordinates - location of the entry @long[][] toLongArray()
Object[][] toObjectArray()
short getAsShort(long... coordinates)
coordinates - location of the entryvoid setAsShort(short value,
long... coordinates)
value - short valuecoordinates - location of the entry @short[][] toShortArray()
String[][] toStringArray()
Object getPreferredObject(long... coordinates)
coordinates - location of the entryMatrix getAsMatrix(long... coordinates)
void setAsMatrix(Matrix m, long... coordinates)
Copyright © 2015 Universal Java Matrix Package. All rights reserved.