Class FIFOFrontier<E>
- java.lang.Object
-
- com.ensoftcorp.open.pointsto.utilities.frontier.FIFOFrontier<E>
-
-
Constructor Summary
Constructors Constructor Description FIFOFrontier()
Creates a new frontierFIFOFrontier(int initialCapacity)
Creates a new frontier with the given initial capacity
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(E e)
Adds the element to the end of frontier, if the element already exists the frontier is left unchanged.boolean
hasNext()
Returns true if the frontier is not empty, false otherwiseE
next()
Returns (and removes) the next element from the frontier in First in First out (FIFO) orderlong
size()
Returns the number of elements in this frontier set (its cardinality).java.lang.String
toString()
Returns a string representation of this frontier collection.
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
Returns true if the frontier is not empty, false otherwise
-
next
public E next()
Returns (and removes) the next element from the frontier in First in First out (FIFO) order
-
add
public boolean add(E e)
Adds the element to the end of frontier, if the element already exists the frontier is left unchanged. Returns true if the element was added, false if the element already existed.
-
size
public long size()
Returns the number of elements in this frontier set (its cardinality).
-
toString
public java.lang.String toString()
Returns a string representation of this frontier collection. The string representation consists of a list of the collection's elements in the order they are returned by its iterator, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space). Elements are converted to strings as by String.valueOf(Object).
-
-