Class ListeNode<T>

java.lang.Object
fr.formiko.usuel.structures.Node
fr.formiko.usuel.structures.listes.ListeNode<T>
All Implemented Interfaces:
Serializable

class ListeNode<T> extends Node implements Serializable
Constituent ListeNode of the Linked Liste
Author:
Hydrolien
  • Field Details

    • content

      private T content
    • next

      private ListeNode<T> next
  • Constructor Details

    • ListeNode

      public ListeNode(T content, ListeNode<T> next)
      Main constructor for ListeNode.
    • ListeNode

      public ListeNode(T content)
      Secondary constructor for ListeNode with null next item.
  • Method Details

    • getNext

      public ListeNode<T> getNext()
    • setNext

      public void setNext(ListeNode<T> next)
    • getContent

      public T getContent()
    • setContent

      public void setContent(T content)
    • equals

      public boolean equals(Object o)
      Equals function that also test next.
      Overrides:
      equals in class Object
    • removeItem

      public boolean removeItem(int i)
      Delete the xa element
      Parameters:
      i - the number of the element to remove.
      Returns:
      true if it have been remove
    • remove

      public boolean remove(T t)
      Delete the 1a t element
      Parameters:
      t - the element to remove.
      Returns:
      true if it have been remove
    • add

      public boolean add(int index, T t)
      Add the t element
      Parameters:
      t - the element to add.
      Returns:
      true if it have been add.