Class MultiKeyArrayOfKeys<T>

java.lang.Object
com.espertech.esper.common.internal.collection.MultiKeyArrayOfKeys<T>

public final class MultiKeyArrayOfKeys<T> extends Object
Functions as a key value for Maps where keys need to be composite values. The class allows a Map that uses HashableMultiKey entries for key values to use multiple objects as keys. It calculates the hashCode from the key objects on construction and caches the hashCode.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final EPTypeClass
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for multiple keys supplied in an object array.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    equals(Object other)
     
    final T
    get(int index)
    Returns the key object at the specified position.
    final T[]
    Returns the key value array.
    final int
     
    final int
    Returns the number of key objects.
    final String
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • MultiKeyArrayOfKeys

      public MultiKeyArrayOfKeys(T[] keys)
      Constructor for multiple keys supplied in an object array.
      Parameters:
      keys - is an array of key objects
  • Method Details

    • size

      public final int size()
      Returns the number of key objects.
      Returns:
      size of key object array
    • get

      public final T get(int index)
      Returns the key object at the specified position.
      Parameters:
      index - is the array position
      Returns:
      key object at position
    • equals

      public final boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • getArray

      public final T[] getArray()
      Returns the key value array.
      Returns:
      key value array