Class SortedPathList<T extends PathNode>

  • All Implemented Interfaces:
    java.lang.Iterable<T>, java.util.Collection<T>

    public class SortedPathList<T extends PathNode>
    extends java.util.AbstractCollection<T>
    Created with IntelliJ IDEA.
    Since:
    : 3/31/2015 Time : 5:50 PM
    • Constructor Summary

      Constructors 
      Constructor Description
      SortedPathList()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(T o)
      Adds object to list, then sorts list entirely.
      void clear()
      Clear the list of all the items.
      boolean contains​(java.lang.Object o)
      T first()
      Gets the first indexed value in the list.
      java.util.Iterator<T> iterator()
      boolean remove​(java.lang.Object o)
      int size()
      Get the number of elements in the list
      • Methods inherited from class java.util.AbstractCollection

        addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
    • Constructor Detail

      • SortedPathList

        public SortedPathList()
    • Method Detail

      • first

        public T first()
        Gets the first indexed value in the list.
        Returns:
        the first value in the list.
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.util.Collection<T extends PathNode>
        Specified by:
        iterator in interface java.lang.Iterable<T extends PathNode>
        Specified by:
        iterator in class java.util.AbstractCollection<T extends PathNode>
      • clear

        public void clear()
        Clear the list of all the items.
        Specified by:
        clear in interface java.util.Collection<T extends PathNode>
        Overrides:
        clear in class java.util.AbstractCollection<T extends PathNode>
      • add

        public boolean add​(T o)
        Adds object to list, then sorts list entirely.
        Specified by:
        add in interface java.util.Collection<T extends PathNode>
        Overrides:
        add in class java.util.AbstractCollection<T extends PathNode>
        Parameters:
        o - The object to add to the list.
        Returns:
        true if object was added successfully, otherwise false.
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<T extends PathNode>
        Overrides:
        remove in class java.util.AbstractCollection<T extends PathNode>
      • size

        public int size()
        Get the number of elements in the list
        Specified by:
        size in interface java.util.Collection<T extends PathNode>
        Specified by:
        size in class java.util.AbstractCollection<T extends PathNode>
        Returns:
        The number of element in the list
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<T extends PathNode>
        Overrides:
        contains in class java.util.AbstractCollection<T extends PathNode>