public class FIFOQueueTest extends FIFOQueue
"This non-final class defines a clone() method that does not call super.clone(). If this class ("A") is extended by a subclass ("B"), and the subclass B calls super.clone(), then it is likely that B's clone() method will return an object of type A, which violates the standard contract for clone()."
"If all clone() methods call super.clone(), then they are guaranteed to use Object.clone(), which always returns an object of the correct type."
INFINITE_CAPACITY
Constructor and Description |
---|
FIFOQueueTest() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Return a clone of this object.
|
clear, elementList, elements, get, getCapacity, getContainer, getHistoryCapacity, historyElementList, historyElements, historySize, isFull, put, setCapacity, setContainer, setHistoryCapacity, size, take
public FIFOQueueTest()