Class DictItems

java.lang.Object
src.DictItems
All Implemented Interfaces:
Iterable<Object[]>

public class DictItems extends Object implements Iterable<Object[]>
DictItems is a class that represents a collection of key-value pairs. It implements the Iterable interface, allowing iteration over the items in the collection.
  • Constructor Details

    • DictItems

      public DictItems(Object[][] items)
  • Method Details

    • length

      public int length()
      Returns the number of items in the collection.
      Returns:
      the number of items
    • toArray

      public Object[][] toArray()
      Returns a copied list of the dictionary values.
      Returns:
      a copy of the dictionary values
    • iterator

      public Iterator<Object[]> iterator()
      Returns an iterator over the items in the collection. * @return an iterator over the items
      Specified by:
      iterator in interface Iterable<Object[]>
    • toString

      public String toString()
      Returns a string representation of the items in the collection.
      Overrides:
      toString in class Object
      Returns:
      the string representation of the items
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object