Class CMList<T>

java.lang.Object
kr.ac.konkuk.ccslab.cm.entity.CMList<T>
Type Parameters:
T - - T is the class of a list element.

public class CMList<T> extends Object
The CMList<T> class represents a list of CM objects.
  • Constructor Details

    • CMList

      public CMList()
      Creates an instance of the CMList class.
  • Method Details

    • addElement

      public boolean addElement(T element)
      Adds an element to the list.
      Parameters:
      element - - an element of T type
      Returns:
      true if the element is successfully added to the list; false otherwise.
    • removeElement

      public boolean removeElement(T element)
      Removes an element from the list.
      Parameters:
      element - - an element of T type
      Returns:
      true if the element is successfully removed from the list; false otherwise.
    • removeAllElements

      public void removeAllElements()
      Removes all elements from the list.
    • findElement

      public T findElement(T element)
      Finds an element in the list.
      Parameters:
      element - - an element of type T
      Returns:
      true if the element is found; false otherwise.
    • getSize

      public int getSize()
      Returns the size of list.
      Returns:
      the size of list.
    • isEmpty

      public boolean isEmpty()
      Tests if this list has no element.
      Returns:
      true if this list has no element; false otherwise.
    • getList

      public Vector<T> getList()
      Returns the Vector of this list.
      Returns:
      the Vector of this list.
    • toString

      public String toString()
      Overrides:
      toString in class Object