Interface Table<T>

All Known Implementing Classes:
HashTable

public interface Table<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    add(T element)
    Add Element to Table.
    boolean
    contains(T element)
    Checks if an element is in the table.
    boolean
    remove(T element)
    Remove element from Table.
    int
    Return the amount of elements in the table.
  • Method Details

    • add

      boolean add(T element)
      Add Element to Table.
      Parameters:
      element - to be added
      Returns:
      true if element could be added, false if not
    • remove

      boolean remove(T element)
      Remove element from Table.
      Parameters:
      element - to be removed.
      Returns:
      true if element was removed, false if not
    • contains

      boolean contains(T element)
      Checks if an element is in the table.
      Parameters:
      element - to be checked
      Returns:
      true if present, false if not
    • size

      int size()
      Return the amount of elements in the table.
      Returns:
      the amount of elements