Class NumberedSet.InternalMap

All Implemented Interfaces:
Arrangeable, Ordered<T>, Iterable<ObjectIntMap.Entry<T>>
Enclosing class:
NumberedSet<T>

protected class NumberedSet.InternalMap extends ObjectIntOrderedMap<T>
  • Constructor Details

    • InternalMap

      public InternalMap()
    • InternalMap

      public InternalMap(int initialCapacity)
    • InternalMap

      public InternalMap(int initialCapacity, float loadFactor)
    • InternalMap

      public InternalMap(ObjectIntOrderedMap<? extends T> map)
    • InternalMap

      public InternalMap(ObjectIntMap<? extends T> map)
    • InternalMap

      public InternalMap(T[] keys, int[] values)
    • InternalMap

      public InternalMap(Collection<? extends T> keys, PrimitiveCollection.OfInt values)
  • Method Details

    • place

      protected int place(Object item)
      Description copied from class: ObjectIntMap
      Returns an index >= 0 and <= ObjectIntMap.mask for the specified item, mixed.
      Overrides:
      place in class ObjectIntMap<T>
      Parameters:
      item - a non-null Object; its hashCode() method should be used by most implementations
      Returns:
      an index between 0 and ObjectIntMap.mask (both inclusive)
    • equate

      protected boolean equate(Object left, Object right)
      Description copied from class: ObjectIntMap
      Compares the objects left and right, which are usually keys, for equality, returning true if they are considered equal. This is used by the rest of this class to determine whether two keys are considered equal. Normally, this returns left.equals(right), but subclasses can override it to use reference equality, fuzzy equality, deep array equality, or any other custom definition of equality. Usually, ObjectIntMap.place(Object) is also overridden if this method is.
      Overrides:
      equate in class ObjectIntMap<T>
      Parameters:
      left - must be non-null; typically a key being compared, but not necessarily
      right - may be null; typically a key being compared, but can often be null for an empty key slot, or some other type
      Returns:
      true if left and right are considered equal for the purposes of this class
    • addOrIndex

      protected int addOrIndex(T t)