Documentation of 'org.freehep.util.DoubleHashtable' Java class
DoubleHashtable
org.freehep.util

Class DoubleHashtable

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable, java.util.Collection


    public class DoubleHashtable
    extends java.util.AbstractCollection
    implements java.io.Serializable
    Stores a hashtable of hashtables, which can be indexed by a key and a subkey. Keys and Values can be null.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      DoubleHashtable()
      creates a hashtable of hashtables
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void clear()
      removes all entries and sub-tables
      void clear(java.lang.Object key)
      removes all entries from a subtable
      java.lang.Object clone() 
      boolean contains(java.lang.Object value) 
      boolean containsKey(java.lang.Object key) 
      boolean containsKey(java.lang.Object key, java.lang.Object subKey) 
      java.util.Enumeration elements() 
      java.util.Hashtable get(java.lang.Object key) 
      java.lang.Object get(java.lang.Object key, java.lang.Object subKey) 
      boolean isEmpty() 
      java.util.Iterator iterator() 
      java.util.Enumeration keys() 
      java.util.Enumeration keys(java.lang.Object key) 
      java.lang.Object put(java.lang.Object key, java.lang.Object subKey, java.lang.Object value)
      puts a value in sub-table specified by key and subkey.
      java.lang.Object remove(java.lang.Object key, java.lang.Object subKey)
      removes value from sub-table specified by key and subkey.
      int size() 
      java.lang.String toString() 
      • Methods inherited from class java.util.AbstractCollection

        add, addAll, containsAll, remove, removeAll, retainAll, toArray, toArray
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        equals, hashCode, parallelStream, removeIf, spliterator, stream
      • Methods inherited from interface java.lang.Iterable

        forEach
    • Constructor Detail

      • DoubleHashtable

        public DoubleHashtable()
        creates a hashtable of hashtables
    • Method Detail

      • clear

        public void clear()
        removes all entries and sub-tables
        Specified by:
        clear in interface java.util.Collection
        Overrides:
        clear in class java.util.AbstractCollection
      • clear

        public void clear(java.lang.Object key)
        removes all entries from a subtable
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException
      • contains

        public boolean contains(java.lang.Object value)
        Specified by:
        contains in interface java.util.Collection
        Overrides:
        contains in class java.util.AbstractCollection
        Returns:
        true if value exists in some sub-table
      • containsKey

        public boolean containsKey(java.lang.Object key)
        Returns:
        true if sub-table exists for key
      • containsKey

        public boolean containsKey(java.lang.Object key,
                                   java.lang.Object subKey)
        Returns:
        true if value exists for key and subkey
      • elements

        public java.util.Enumeration elements()
        Returns:
        enumeration over all values in all sub-tables
      • iterator

        public java.util.Iterator iterator()
        Specified by:
        iterator in interface java.lang.Iterable
        Specified by:
        iterator in interface java.util.Collection
        Specified by:
        iterator in class java.util.AbstractCollection
        Returns:
        iterator over all values in all sub-tables
      • get

        public java.util.Hashtable get(java.lang.Object key)
        Returns:
        sub-table for key
      • get

        public java.lang.Object get(java.lang.Object key,
                                    java.lang.Object subKey)
        Returns:
        value for key and subkey, null in non-existent or null value was stored
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection
        Overrides:
        isEmpty in class java.util.AbstractCollection
        Returns:
        true if table is empty
      • keys

        public java.util.Enumeration keys()
        Returns:
        enumeration of keys in table
      • keys

        public java.util.Enumeration keys(java.lang.Object key)
        Returns:
        enumeration in subkeys of sub-table pointed by key, and empty if sub-table does not exist
      • put

        public java.lang.Object put(java.lang.Object key,
                                    java.lang.Object subKey,
                                    java.lang.Object value)
        puts a value in sub-table specified by key and subkey.
        Returns:
        previous value
      • remove

        public java.lang.Object remove(java.lang.Object key,
                                       java.lang.Object subKey)
        removes value from sub-table specified by key and subkey.
        Returns:
        previous value
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection
        Specified by:
        size in class java.util.AbstractCollection
        Returns:
        size of all tables
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.AbstractCollection
        Returns:
        a string representation of the table

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.