Class LeafNode<K,V>

java.lang.Object
org.javimmutable.collections.tree.LeafNode<K,V>
All Implemented Interfaces:
Iterable<IMapEntry<K,V>>, CollisionMap.Node, CollisionSet.Node, GenericIterator.Iterable<IMapEntry<K,V>>, SplitableIterable<IMapEntry<K,V>>

public class LeafNode<K,V> extends Object
¬ * A Node containing one value and no children.
  • Method Details

    • iterateOverRange

      @Nullable public GenericIterator.State<IMapEntry<K,V>> iterateOverRange(@Nullable GenericIterator.State<IMapEntry<K,V>> parent, int offset, int limit)
      Description copied from interface: GenericIterator.Iterable
      Create a State to iterate over the specified range of values if possible. Can return null if no more values are available. The range must be valid for the collection being iterated over. The returned State will return the parent as its result when iteration over the range is completed.
      Parameters:
      parent - State to return to once the request iteration completes
      offset - starting point for iteration
      limit - stopping point for iteration
      Returns:
      null or a valid state
    • iterableSize

      public int iterableSize()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object