Interface GettersAndSetters

All Known Subinterfaces:
BaseBigDecimalMatrix, BaseBigIntegerMatrix, BaseBooleanMatrix, BaseDoubleMatrix, BaseGenericMatrix<T>, BaseNumberMatrix<T>, BaseObjectMatrix, BigDecimalMatrix, BigDecimalMatrix2D, BigDecimalMatrixMultiD, BigIntegerMatrix, BigIntegerMatrix2D, BigIntegerMatrixMultiD, BooleanMatrix, BooleanMatrix2D, ByteArrayMatrix, ByteArrayMatrix2D, ByteMatrix, ByteMatrix2D, CharMatrix, CharMatrix2D, DenseBigDecimalMatrix, DenseBigDecimalMatrix2D, DenseBigDecimalMatrixMultiD, DenseBigIntegerMatrix, DenseBigIntegerMatrix2D, DenseBooleanMatrix, DenseBooleanMatrix2D, DenseByteArrayMatrix, DenseByteArrayMatrix2D, DenseByteMatrix, DenseByteMatrix2D, DenseCharMatrix, DenseCharMatrix2D, DenseDoubleMatrix, DenseDoubleMatrix2D, DenseDoubleMatrixMultiD, DenseFloatMatrix, DenseFloatMatrix2D, DenseGenericMatrix<T>, DenseGenericMatrix2D<T>, DenseGenericMatrixMultiD<T>, DenseIntMatrix, DenseIntMatrix2D, DenseLongMatrix, DenseLongMatrix2D, DenseMatrix, DenseMatrix2D, DenseMatrixMultiD, DenseNumberMatrix<T>, DenseNumberMatrix2D<T>, DenseNumberMatrixMultiD<T>, DenseObjectMatrix, DenseObjectMatrix2D, DenseObjectMatrixMultiD, DenseShortMatrix, DenseShortMatrix2D, DenseStringMatrix, DenseStringMatrix2D, DoubleMatrix, DoubleMatrix2D, DoubleMatrixMultiD, FileOrDirectoryMatrix, FloatMatrix, FloatMatrix2D, GenericMatrix<T>, GenericMatrix2D<T>, GenericMatrixMultiD<T>, GraphMatrix<N,E>, IntMatrix, IntMatrix2D, ListMatrix<T>, LongMatrix, LongMatrix2D, MapMatrix<K,V>, Matrix, Matrix2D, MatrixMultiD, NumberMatrix<T>, NumberMatrix2D<T>, NumberMatrixMultiD<T>, ObjectMatrix, ObjectMatrix2D, ObjectMatrixMultiD, SetMatrix<A>, ShortMatrix, ShortMatrix2D, SparseBigDecimalMatrix, SparseBigDecimalMatrix2D, SparseBigDecimalMatrixMultiD, SparseBigIntegerMatrix, SparseBigIntegerMatrix2D, SparseBooleanMatrix, SparseBooleanMatrix2D, SparseByteArrayMatrix, SparseByteArrayMatrix2D, SparseByteMatrix, SparseByteMatrix2D, SparseCharMatrix, SparseCharMatrix2D, SparseDoubleMatrix, SparseDoubleMatrix2D, SparseDoubleMatrixMultiD, SparseFloatMatrix, SparseFloatMatrix2D, SparseGenericMatrix<T>, SparseGenericMatrix2D<T>, SparseGenericMatrixMultiD<T>, SparseIntMatrix, SparseIntMatrix2D, SparseLongMatrix, SparseLongMatrix2D, SparseMatrix, SparseMatrix2D, SparseMatrixMultiD, SparseNumberMatrix<T>, SparseNumberMatrix2D<T>, SparseNumberMatrixMultiD<T>, SparseObjectMatrix, SparseObjectMatrix2D, SparseObjectMatrixMultiD, SparseShortMatrix, SparseShortMatrix2D, SparseStringMatrix, SparseStringMatrix2D, StringMatrix, StringMatrix2D, TextBlock, TextSentence, TextToken, TreeMatrix<T>
All Known Implementing Classes:
AbstractBigDecimalMatrix, AbstractBigIntegerMatrix, AbstractBooleanMatrix, AbstractByteArrayMatrix, AbstractByteMatrix, AbstractCharMatrix, AbstractCommonsMathDenseDoubleMatrix2D, AbstractDenseBigDecimalMatrix, AbstractDenseBigDecimalMatrix2D, AbstractDenseBigIntegerMatrix, AbstractDenseBigIntegerMatrix2D, AbstractDenseBooleanMatrix, AbstractDenseBooleanMatrix2D, AbstractDenseByteArrayMatrix, AbstractDenseByteArrayMatrix2D, AbstractDenseByteMatrix, AbstractDenseByteMatrix2D, AbstractDenseCharMatrix, AbstractDenseCharMatrix2D, AbstractDenseDoubleMatrix2D, AbstractDenseDoubleMatrixMultiD, AbstractDenseFloatMatrix, AbstractDenseFloatMatrix2D, AbstractDenseGenericMatrix, AbstractDenseGenericMatrix2D, AbstractDenseIntMatrix, AbstractDenseIntMatrix2D, AbstractDenseJDBCMatrix2D, AbstractDenseLongMatrix, AbstractDenseLongMatrix2D, AbstractDenseObjectMatrix, AbstractDenseObjectMatrix2D, AbstractDenseShortMatrix, AbstractDenseShortMatrix2D, AbstractDenseStringMatrix, AbstractDenseStringMatrix2D, AbstractDoubleMatrix, AbstractDoubleMatrix2D, AbstractDoubleMatrixMultiD, AbstractFloatMatrix, AbstractGenericMatrix, AbstractGraphMatrix, AbstractIntMatrix, AbstractListMatrix, AbstractLongMatrix, AbstractMapMatrix, AbstractMapMatrixList, AbstractMapToSparseMatrixWrapper, AbstractMapToTiledMatrix2DWrapper, AbstractMatrix, AbstractNumberMatrix, AbstractObjectMatrix, AbstractSetMatrix, AbstractShortMatrix, AbstractSparseBigDecimalMatrix, AbstractSparseBigDecimalMatrix2D, AbstractSparseBigIntegerMatrix, AbstractSparseBigIntegerMatrix2D, AbstractSparseBooleanMatrix, AbstractSparseBooleanMatrix2D, AbstractSparseByteArrayMatrix, AbstractSparseByteArrayMatrix2D, AbstractSparseByteMatrix, AbstractSparseByteMatrix2D, AbstractSparseCharMatrix, AbstractSparseCharMatrix2D, AbstractSparseDoubleMatrix, AbstractSparseDoubleMatrix2D, AbstractSparseFloatMatrix, AbstractSparseFloatMatrix2D, AbstractSparseGenericMatrix, AbstractSparseGenericMatrix2D, AbstractSparseIntMatrix, AbstractSparseIntMatrix2D, AbstractSparseLongMatrix, AbstractSparseLongMatrix2D, AbstractSparseObjectMatrix, AbstractSparseObjectMatrix2D, AbstractSparseShortMatrix, AbstractSparseShortMatrix2D, AbstractSparseStringMatrix, AbstractSparseStringMatrix2D, AbstractStringMatrix, AbstractTreeMatrix, ArrayDenseBigDecimalMatrix2D, ArrayDenseBigIntegerMatrix2D, ArrayDenseBooleanMatrix2D, ArrayDenseByteMatrix2D, ArrayDenseCharMatrix2D, ArrayDenseDoubleMatrix2D, ArrayDenseFloatMatrix2D, ArrayDenseIntMatrix2D, ArrayDenseLongMatrix2D, ArrayDenseObjectMatrix2D, ArrayDenseShortMatrix2D, ArrayDenseStringMatrix2D, AvailableProcessorsMatrix, BenchmarkConfig, BigDecimalCalculationMatrix, BigIntegerCalculationMatrix, BitSetDenseBooleanMatrix2D, BlockDenseDoubleMatrix2D, BooleanCalculationMatrix, BufferedObjectMatrix, ByteCalculationMatrix, CharCalculationMatrix, ClientMatrix, ColtDenseDoubleMatrix2D, ColtSparseDoubleMatrix2D, CommonsMathArrayDenseDoubleMatrix2D, CommonsMathBlockDenseDoubleMatrix2D, DefaultDenseBigDecimalMatrix2D, DefaultDenseBigIntegerMatrix2D, DefaultDenseByteMatrix2D, DefaultDenseCharMatrix2D, DefaultDenseDoubleMatrix2D, DefaultDenseDoubleMatrixMultiD, DefaultDenseFloatMatrix2D, DefaultDenseGenericMatrix2D, DefaultDenseIntMatrix2D, DefaultDenseLongMatrix2D, DefaultDenseObjectMatrix2D, DefaultDenseObjectMatrixMultiD, DefaultDenseShortMatrix2D, DefaultDenseStringMatrix2D, DefaultGraphMatrix, DefaultListMatrix, DefaultMapMatrix, DefaultSetMatrix, DefaultSparseBigDecimalMatrix, DefaultSparseBigIntegerMatrix, DefaultSparseBooleanMatrix, DefaultSparseByteMatrix, DefaultSparseCharMatrix, DefaultSparseColumnObjectMatrix2D, DefaultSparseDoubleMatrix, DefaultSparseDoubleVector1D, DefaultSparseFloatMatrix, DefaultSparseGenericMatrix, DefaultSparseIntMatrix, DefaultSparseLongMatrix, DefaultSparseObjectMatrix, DefaultSparseRowDoubleMatrix2D, DefaultSparseRowObjectMatrix2D, DefaultSparseShortMatrix, DefaultSparseStringMatrix, DefaultTextBlock, DefaultTextSentence, DefaultTextToken, DefaultTiledObjectMatrix2D, DefaultTreeMatrix, DenseCSVStringMatrix2D, DenseDerbyMatrix2D, DenseFileMatrix, DenseHSQLDBMatrix2D, DenseMySQLMatrix2D, DensePostgreSQLMatrix2D, DirectoryMatrix, DoubleCalculationMatrix, EmptyMatrix, FileFormatMatrix, FileMatrix, FloatCalculationMatrix, HttpMatrix, ImageMatrix, IndexedSparseDoubleMatrix2D, IntCalculationMatrix, IrisMatrix, JamaDenseDoubleMatrix2D, JBlasDenseDoubleMatrix2D, JDBCCatalogListMatrix, JDBCCatalogMatrix, JDBCMapMatrix, JDBCSetMatrix, JDBCSparseObjectMatrix, La4JDenseDoubleMatrix2D, LocalhostMatrix, LongCalculationMatrix, MandelbrotMatrix, MatrixLibraries, MatrixUIDefaults, MemoryUsageMatrix, MessageMatrix, MessagesMatrix, MortonDenseDoubleMartrix2D, NetworkInterfaceMatrix, NetworkMatrix, ObjectCalculationMatrix, ObjectTreeMatrix, OperatingSystemMatrix, RandomSeedMatrix, RemoteHostMatrix, RemoteObjectMatrixUDP, RunningThreadsMatrix, SerializedSparseObjectMatrix, ServerObjectMatrixUDP, ShortCalculationMatrix, SparseCSVMatrix, SparseFeatureVector, StringCalculationMatrix, SubnetMatrix, SynchronizedGenericMatrix, SystemEnvironmentMatrix, SystemPropertiesMatrix, SystemTimeMatrix, TextContentMatrix, TimeSeriesMatrix, UJMPPluginsMatrix, UJMPSettings, VecMathDenseDoubleMatrix2D, VolatileSparseObjectMatrix, WaveMatrix, WelcomeMatrix, ZipEntryMatrix, ZipFileMatrix

public interface GettersAndSetters
This interface declares the getters and setters for the entries in the Matrix for the most important Java types: boolean, int, char, float, double, long, Date, Object and String.

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.

  • Method Summary

    Modifier and Type
    Method
    Description
    getAsBigDecimal(long... coordinates)
     
    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.
    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.
    getAsMatrix(long... coordinates)
     
    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.
    getAsString(long... coordinates)
    Returns a String representation of an entry in the matrix.
    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.
     
     
    boolean[][]
    Converts the content of a matrix into a 2-dimensional array of boolean values.
    byte[][]
    Converts the content of a matrix into a 2-dimensional array of byte values.
    char[][]
    Converts the content of a matrix into a 2-dimensional array of char values.
    Date[][]
    Converts the content of a matrix into a 2-dimensional array of Date values.
    double[][]
    Converts the content of a matrix into a 2-dimensional array of double values.
    float[][]
    Converts the content of a matrix into a 2-dimensional array of float values.
    int[][]
    Converts the content of a matrix into a 2-dimensional array of int values.
    long[][]
    Converts the content of a matrix into a 2-dimensional array of long values.
    Object[][]
    Converts the content of a matrix into a 2-dimensional array of Objects.
    short[][]
    Converts the content of a matrix into a 2-dimensional array of short values.
    String[][]
    Converts the content of a matrix into a 2-dimensional array of Strings.
  • Method Details

    • getAsDouble

      double getAsDouble(long... coordinates)
      Returns a double representation of an entry in the matrix. The stored value will be converted to a double as good as possible.
      Parameters:
      coordinates - location of the entry
      Returns:
      a double representation of the entry @
    • setAsDouble

      void setAsDouble(double value, long... coordinates)
      Sets an entry in the matrix to a double value. If the matrix cannot store double values, the value will be represented as good as possible.
      Parameters:
      value - double value
      coordinates - location of the entry @
    • getAsObject

      Object getAsObject(long... coordinates)
      Returns a raw entry in the matrix as it is stored. If the matrix supports Generics, the return type will match the type that is stored.
      Parameters:
      coordinates - location of the entry
      Returns:
      entry object @
    • setAsObject

      void setAsObject(Object o, long... coordinates)
      Sets an entry in the matrix to an object. If the matrix cannot store this object type, the value will be represented as good as possible.
      Parameters:
      o - the object to store
      coordinates - location of the entry @
    • getAsString

      String getAsString(long... coordinates)
      Returns a String representation of an entry in the matrix. The stored value will be converted to a String as good as possible.
      Parameters:
      coordinates - location of the entry
      Returns:
      a String representation of the entry @
    • setAsString

      void setAsString(String string, long... coordinates)
      Sets an entry in the matrix to a String value. If the matrix cannot store Strings, the value will be represented as good as possible.
      Parameters:
      value - String value
      coordinates - location of the entry @
    • toDoubleArray

      double[][] toDoubleArray()
      Converts the content of a matrix into a 2-dimensional array of double values.
      Returns:
      double array with matrix entries @
    • getAsByte

      byte getAsByte(long... coordinates)
      Returns a byte representation of an entry in the matrix. The stored value will be converted to a byte as good as possible.
      Parameters:
      coordinates - location of the entry
      Returns:
      a byte representation of the entry @
    • getAsByteArray

      byte[] getAsByteArray(long... coordinates)
      Returns a byte array representation of an entry in the matrix. The stored value will be converted to a byte array as good as possible.
      Parameters:
      coordinates - location of the entry
      Returns:
      a byte array representation of the entry @
    • setAsByte

      void setAsByte(byte value, long... coordinates)
      Sets an entry in the matrix to a byte value. If the matrix cannot store byte values, the value will be represented as good as possible.
      Parameters:
      value - byte value
      coordinates - location of the entry @
    • setAsByteArray

      void setAsByteArray(byte[] value, long... coordinates)
      Sets an entry in the matrix to a byte array. If the matrix cannot store byte array, the value will be represented as good as possible.
      Parameters:
      value - byte array
      coordinates - location of the entry @
    • toBooleanArray

      boolean[][] toBooleanArray()
      Converts the content of a matrix into a 2-dimensional array of boolean values.
      Returns:
      boolean array with matrix entries @
    • toBigDecimalArray

      BigDecimal[][] toBigDecimalArray()
    • toBigIntegerArray

      BigInteger[][] toBigIntegerArray()
    • toByteArray

      byte[][] toByteArray()
      Converts the content of a matrix into a 2-dimensional array of byte values.
      Returns:
      byte array with matrix entries @
    • getAsBoolean

      boolean getAsBoolean(long... coordinates)
      Returns a byte representation of an entry in the matrix. The stored value will be converted to a boolean as good as possible.
      Parameters:
      coordinates - location of the entry
      Returns:
      a boolean representation of the entry @
    • getAsBigInteger

      BigInteger getAsBigInteger(long... coordinates)
    • getAsBigDecimal

      BigDecimal getAsBigDecimal(long... coordinates)
    • setAsBoolean

      void setAsBoolean(boolean value, long... coordinates)
      Sets an entry in the matrix to a boolean value. If the matrix cannot store byte values, the value will be represented as good as possible.
      Parameters:
      value - boolean value
      coordinates - location of the entry @
    • setAsBigInteger

      void setAsBigInteger(BigInteger value, long... coordinates)
    • setAsBigDecimal

      void setAsBigDecimal(BigDecimal value, long... coordinates)
    • getAsChar

      char getAsChar(long... coordinates)
      Returns a char representation of an entry in the matrix. The stored value will be converted to a char as good as possible.
      Parameters:
      coordinates - location of the entry
      Returns:
      a char representation of the entry @
    • setAsChar

      void setAsChar(char value, long... coordinates)
      Sets an entry in the matrix to a char value. If the matrix cannot store char values, the value will be represented as good as possible.
      Parameters:
      value - char value
      coordinates - location of the entry @
    • toCharArray

      char[][] toCharArray()
      Converts the content of a matrix into a 2-dimensional array of char values.
      Returns:
      char array with matrix entries @
    • getAsDate

      Date getAsDate(long... coordinates)
      Returns a Date representation of an entry in the matrix. The stored value will be converted to a Date object as good as possible.
      Parameters:
      coordinates - location of the entry
      Returns:
      a String representation of the entry @
    • setAsDate

      void setAsDate(Date date, long... coordinates)
      Sets an entry in the matrix to a Date value. If the matrix cannot store Date objects, the value will be represented as good as possible.
      Parameters:
      value - Date object to store
      coordinates - location of the entry @
    • toDateArray

      Date[][] toDateArray()
      Converts the content of a matrix into a 2-dimensional array of Date values.
      Returns:
      Date array with matrix entries @
    • getAsFloat

      float getAsFloat(long... coordinates)
      Returns a float representation of an entry in the matrix. The stored value will be converted to a float as good as possible.
      Parameters:
      coordinates - location of the entry
      Returns:
      a float representation of the entry @
    • setAsFloat

      void setAsFloat(float value, long... coordinates)
      Sets an entry in the matrix to a float value. If the matrix cannot store float values, the value will be represented as good as possible.
      Parameters:
      value - float value
      coordinates - location of the entry @
    • toFloatArray

      float[][] toFloatArray()
      Converts the content of a matrix into a 2-dimensional array of float values.
      Returns:
      float array with matrix entries @
    • getAsInt

      int getAsInt(long... coordinates)
      Returns an int representation of an entry in the matrix. The stored value will be converted to an int as good as possible.
      Parameters:
      coordinates - location of the entry
      Returns:
      an int representation of the entry @
    • setAsInt

      void setAsInt(int value, long... coordinates)
      Sets an entry in the matrix to an int value. If the matrix cannot store int values, the value will be represented as good as possible.
      Parameters:
      value - int value
      coordinates - location of the entry @
    • toIntArray

      int[][] toIntArray()
      Converts the content of a matrix into a 2-dimensional array of int values.
      Returns:
      int array with matrix entries @
    • getAsLong

      long getAsLong(long... coordinates)
      Returns a long representation of an entry in the matrix. The stored value will be converted to a long as good as possible.
      Parameters:
      coordinates - location of the entry
      Returns:
      a long representation of the entry @
    • setAsLong

      void setAsLong(long value, long... coordinates)
      Sets an entry in the matrix to a long value. If the matrix cannot store long values, the value will be represented as good as possible.
      Parameters:
      value - long value
      coordinates - location of the entry @
    • toLongArray

      long[][] toLongArray()
      Converts the content of a matrix into a 2-dimensional array of long values.
      Returns:
      long array with matrix entries @
    • toObjectArray

      Object[][] toObjectArray()
      Converts the content of a matrix into a 2-dimensional array of Objects.
      Returns:
      Object array with matrix entries @
    • getAsShort

      short getAsShort(long... coordinates)
      Returns a short representation of an entry in the matrix. The stored value will be converted to a short as good as possible.
      Parameters:
      coordinates - location of the entry
      Returns:
      a short representation of the entry @
    • setAsShort

      void setAsShort(short value, long... coordinates)
      Sets an entry in the matrix to a short value. If the matrix cannot store short values, the value will be represented as good as possible.
      Parameters:
      value - short value
      coordinates - location of the entry @
    • toShortArray

      short[][] toShortArray()
      Converts the content of a matrix into a 2-dimensional array of short values.
      Returns:
      short array with matrix entries @
    • toStringArray

      String[][] toStringArray()
      Converts the content of a matrix into a 2-dimensional array of Strings.
      Returns:
      String array with matrix entries @
    • getPreferredObject

      Object getPreferredObject(long... coordinates)
      Returns a representation of the entry in the matrix that reflects the true object best. E.g. if the entry is a String "-5.3", this method returns a double with the equivalent value. For a String "text" the string itself is returned.
      Parameters:
      coordinates - location of the entry
      Returns:
      object that represents the matrix entry best @
    • getAsMatrix

      Matrix getAsMatrix(long... coordinates)
    • setAsMatrix

      void setAsMatrix(Matrix m, long... coordinates)