Package com.gargoylesoftware.base.trace
Class TraceItemQueue
- java.lang.Object
-
- com.gargoylesoftware.base.trace.TraceItemQueue
-
public class TraceItemQueue extends java.lang.ObjectInternal use only.
.- Version:
- $Revision: 1.7 $
-
-
Field Summary
Fields Modifier and Type Field Description private TraceItemfirstItem_private intitemCount_private TraceItemlastItem_
-
Constructor Summary
Constructors Constructor Description TraceItemQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassertNotNull(java.lang.String fieldName, java.lang.Object fieldValue)Verify that the specified value is not null.private voidcheckValidity()TraceItempop()Return the next item on the queue or null if the queue is emptyvoidpush(TraceItem item)intsize()java.lang.StringtoString()
-
-
-
Method Detail
-
push
public void push(TraceItem item)
- Parameters:
item- The item to push.
-
pop
public TraceItem pop()
Return the next item on the queue or null if the queue is empty- Returns:
- The next item or null.
-
checkValidity
private void checkValidity()
-
size
public int size()
- Returns:
- the number of items in the queue.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- Returns:
- The string representation of this object.
-
assertNotNull
protected final void assertNotNull(java.lang.String fieldName, java.lang.Object fieldValue) throws DetailedNullPointerExceptionVerify that the specified value is not null. If it is then throw an exception- Parameters:
fieldName- The name of the field to checkfieldValue- The value of the field to check- Throws:
DetailedNullPointerException- If fieldValue is null
-
-