org.jgap.audit
Class KeyedValues2D
- java.lang.Object
-
- org.jgap.audit.KeyedValues2D
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, ICloneable
public class KeyedValues2D extends java.lang.Object implements ICloneable, java.io.Serializable
A collection of (row, column) tupels- Since:
- 2.3
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description KeyedValues2D()Constructor setting behavior: non-sorted keysKeyedValues2D(boolean a_sortRowKeys)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()booleanequals(java.lang.Object a_object)Tests if this object is equal to anotherintgetColumnCount()java.lang.ComparablegetColumnKey(int a_column)java.util.ListgetColumnKeys()intgetRowCount()intgetRowIndex(java.lang.Comparable a_key)java.lang.ComparablegetRowKey(int a_row)java.util.ListgetRowKeys()java.lang.NumbergetValue(java.lang.Comparable a_rowKey, java.lang.Comparable a_columnKey)java.lang.NumbergetValue(int a_row, int a_column)Returns the value for a given row and columninthashCode()voidsetValue(java.lang.Number a_value, java.lang.Comparable a_rowKey, java.lang.Comparable a_columnKey)Sets a value.
-
-
-
Constructor Detail
-
KeyedValues2D
public KeyedValues2D()
Constructor setting behavior: non-sorted keys- Since:
- 2.3
-
KeyedValues2D
public KeyedValues2D(boolean a_sortRowKeys)
Constructor.- Parameters:
a_sortRowKeys- true: row keys should be sorted- Since:
- 2.3
-
-
Method Detail
-
getRowCount
public int getRowCount()
- Returns:
- the number of rows
- Since:
- 2.3
-
getColumnCount
public int getColumnCount()
- Returns:
- the number of columns
- Since:
- 2.3
-
getValue
public java.lang.Number getValue(int a_row, int a_column)Returns the value for a given row and column- Parameters:
a_row- the row indexa_column- the column index- Returns:
- value at given row and column
- Since:
- 2.3
-
getRowKey
public java.lang.Comparable getRowKey(int a_row)
- Parameters:
a_row- the row index, starting at 0- Returns:
- key for the given row
- Since:
- 2.3
-
getRowIndex
public int getRowIndex(java.lang.Comparable a_key)
- Parameters:
a_key- the row key- Returns:
- row index for the given key
- Since:
- 2.3
-
getRowKeys
public java.util.List getRowKeys()
- Returns:
- row keys
- Since:
- 2.3
-
getColumnKey
public java.lang.Comparable getColumnKey(int a_column)
- Parameters:
a_column- the column- Returns:
- key for the given column
- Since:
- 2.3
-
getColumnKeys
public java.util.List getColumnKeys()
- Returns:
- the column keys
- Since:
- 2.3
-
getValue
public java.lang.Number getValue(java.lang.Comparable a_rowKey, java.lang.Comparable a_columnKey)- Parameters:
a_rowKey- the row keya_columnKey- the column key- Returns:
- value for the given row and column keys
- Since:
- 2.3
-
setValue
public void setValue(java.lang.Number a_value, java.lang.Comparable a_rowKey, java.lang.Comparable a_columnKey)Sets a value.- Parameters:
a_value- the valuea_rowKey- the row keya_columnKey- the column key- Since:
- 2.3
-
equals
public boolean equals(java.lang.Object a_object)
Tests if this object is equal to another- Overrides:
equalsin classjava.lang.Object- Parameters:
a_object- other object.- Returns:
- true: this object is equal to the other one
- Since:
- 2.3
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object- Returns:
- hash code of the instance
- Since:
- 2.3
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceICloneable- Overrides:
clonein classjava.lang.Object- Returns:
- clone of the current instance
- Since:
- 2.3
-
-
DMelt 3.0 © DataMelt by jWork.ORG