Class SearchedItemsLinkedList.ItemListNode

java.lang.Object
org.troy.capstone.data_structures.SearchedItemsLinkedList.ItemListNode
Enclosing class:
SearchedItemsLinkedList

private static class SearchedItemsLinkedList.ItemListNode extends Object
Private inner class representing a node in the linked list.
  • Field Details

  • Constructor Details

    • ItemListNode

      public ItemListNode(List<Item> items)
      Constructor for ItemListNode.
      Parameters:
      items - The list of items to be contained in this node, representing a page of search results.
      Preconditions:
      items should be a valid list of items corresponding to a page of search results, and should not be null.
  • Method Details

    • getItems

      public List<Item> getItems()
      Returns the list of items contained in this node.
      Returns:
      The list of items in this node.
    • getNext

      Returns the next node in the linked list.
      Returns:
      The next node in the linked list, or null if there is none.
    • getPrev

      Returns the previous node in the linked list.
      Returns:
      The previous node in the linked list, or null if there is none.
    • setNext

      public void setNext(SearchedItemsLinkedList.ItemListNode next)
      Sets the next node in the linked list.
      Parameters:
      next - The node to set as the next node in the linked list.
      Preconditions:
      next should be a valid ItemListNode or null.
    • setPrev

      public void setPrev(SearchedItemsLinkedList.ItemListNode prev)
      Sets the previous node in the linked list.
      Parameters:
      prev - The node to set as the previous node in the linked list.
      Preconditions:
      prev should be a valid ItemListNode or null.