ToIntMap (API documentation of hlt.language packages)
Date: 2013-01-30

hlt.language.util

## Class ToIntMap

- java.lang.Object
- - hlt.language.util.ToIntMap

- Direct Known Subclasses:
    DoubleToIntMap, IntToIntMap, ObjectToIntMap

      public abstract class ToIntMap
      extends java.lang.Object

  This is the mother of the classes of hash tables mapping to ints.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ToIntMap.Entry` The class defining the map entries.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `NOT_FOUND_VALUE` The value returned when a key has no mapping.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ToIntMap()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Removes all entries from this map.
    `abstract boolean` | `containsEntry(ToIntMap.Entry candidate)` Returns `true` if this map contains the specified entry.
    `boolean` | `containsValue(int value)` Returns `true` if this map maps one or more keys to the specified value.
    `boolean` | `equals(java.lang.Object object)` Compares the specified object with this map for equality.
    `int` | `hashCode()` Returns the hash code value for this map.
    `void` | `include(ToIntMap map)` Includes all of the entries from the specified map to this one.
    `boolean` | `isEmpty()` Returns `true` iff this map is empty.
    `boolean` | `isEqualTo(ToIntMap map)` Compares the specified map object with this map for equality.
    `java.util.Iterator` | `iterator()` Returns an iterator through the entries of this map.
    `abstract int` | `put(ToIntMap.Entry entry)` Puts the mapping defined by the specified entry into this map.
    `int` | `size()` Returns the number of key-value entries in this map.
    `java.lang.String` | `toString()` Returns a string form for this map.
    `abstract IntIterator` | `values()` Returns an iterator through the values of this map.

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### NOT_FOUND_VALUE

          public static final int NOT_FOUND_VALUE

      The value returned when a key has no mapping.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ToIntMap

          public ToIntMap()

  - ### Method Detail

    - #### size

          public final int size()

      Returns the number of key-value entries in this map.

    - #### isEmpty

          public final boolean isEmpty()

      Returns `true` iff this map is empty.

    - #### containsValue

          public final boolean containsValue(int value)

      Returns `true` if this map maps one or more keys to the specified value.
      Parameters:
        `value` - the value whose presence in this map is to be tested.

    - #### containsEntry

          public abstract boolean containsEntry(ToIntMap.Entry candidate)

      Returns `true` if this map contains the specified entry.
      Parameters:
        `candidate` - the entry whose presence in this map is to be tested.

    - #### put

          public abstract int put(ToIntMap.Entry entry)

      Puts the mapping defined by the specified entry into this map. Returns the old value if one was there, or the new value.
      Parameters:
        `entry` - the entry whose mapping is to be put into this map.

    - #### include

          public final void include(ToIntMap map)

      Includes all of the entries from the specified map to this one. These entries replace any entries that this map had for any of the keys currently in the specified map.
      Parameters:
        `map` - `IntToIntMap` whose entries will be stored in this map.

    - #### clear

          public final void clear()

      Removes all entries from this map.

    - #### iterator

          public final java.util.Iterator iterator()

      Returns an iterator through the entries of this map. The object returned by its `next()` method is a `ToIntMap.Entry`.

    - #### values

          public abstract IntIterator values()

      Returns an iterator through the values of this map. The value returned by its `next()` method is an int.

    - #### equals

          public boolean equals(java.lang.Object object)

      Compares the specified object with this map for equality. Returns `true` if the given object is also a map and the two maps have equal entries.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `object` - object to be compared for equality with this map.

    - #### isEqualTo

          public final boolean isEqualTo(ToIntMap map)

      Compares the specified map object with this map for equality.
      Parameters:
        `map` - map to be compared for equality with this map.

    - #### hashCode

          public final int hashCode()

      Returns the hash code value for this map. The hash code of a map is defined to be the exclusive or of the hash codes of each entry.
      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public final java.lang.String toString()

      Returns a string form for this map.
      Overrides:
        `toString` in class `java.lang.Object`