Documentation of 'org.jgap.audit.KeyedValues' Java class
KeyedValues
org.jgap.audit

Class KeyedValues

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, ICloneable


    public class KeyedValues
    extends java.lang.Object
    implements ICloneable, java.io.Serializable
    A collection of (key, value) tupels
    Since:
    2.3
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      KeyedValues()
      Creates a new collection (initially empty).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object clone() 
      boolean equals(java.lang.Object a_obj)
      Tests if this object is equal to another
      int getIndex(java.lang.Comparable a_key) 
      java.lang.Comparable getKey(int a_index) 
      java.util.List getKeys()
      Returns the keys for the values in the collection
      java.lang.Number getValue(java.lang.Comparable a_key)
      Returns the value for a given key.
      java.lang.Number getValue(int a_index) 
      int hashCode() 
      void setValue(java.lang.Comparable a_key, java.lang.Number a_value)
      Updates an existing value, or adds a new value to the collection
      int size() 
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KeyedValues

        public KeyedValues()
        Creates a new collection (initially empty).
        Since:
        2.3
    • Method Detail

      • size

        public int size()
        Returns:
        number of items in the collection
        Since:
        2.3
      • getValue

        public java.lang.Number getValue(int a_index)
        Parameters:
        a_index - the index of the item to return the value for
        Returns:
        the value at given index
        Since:
        2.3
      • getKey

        public java.lang.Comparable getKey(int a_index)
        Parameters:
        a_index - the item index to retrieve the key for, starting at 0
        Returns:
        the row key for item at given index
        Since:
        2.3
      • getIndex

        public int getIndex(java.lang.Comparable a_key)
        Parameters:
        a_key - the key to search for
        Returns:
        index for a given key or -1 if the key is not found
        Since:
        2.3
      • getKeys

        public java.util.List getKeys()
        Returns the keys for the values in the collection
        Returns:
        The keys (never null)
        Since:
        2.3
      • getValue

        public java.lang.Number getValue(java.lang.Comparable a_key)
        Returns the value for a given key. For unknown keys, null is returned
        Parameters:
        a_key - the key
        Returns:
        the value for the key
        Since:
        2.3
      • setValue

        public void setValue(java.lang.Comparable a_key,
                             java.lang.Number a_value)
        Updates an existing value, or adds a new value to the collection
        Parameters:
        a_key - the key
        a_value - the value
        Since:
        2.3
      • equals

        public boolean equals(java.lang.Object a_obj)
        Tests if this object is equal to another
        Overrides:
        equals in class java.lang.Object
        Parameters:
        a_obj - the other object
        Returns:
        true: this object is equal to the other one
        Since:
        2.3
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hash code of the instance
        Since:
        2.3
      • clone

        public java.lang.Object clone()
        Specified by:
        clone in interface ICloneable
        Overrides:
        clone in class java.lang.Object
        Returns:
        clone of the current instance
        Since:
        2.3

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.