Interface PsyFormalQueue<T extends PsyObject>
- Type Parameters:
T- a type of contained objects.
- All Superinterfaces:
Iterable<T>, PsyBounded, PsyClearable, PsyContainer<T>, PsyIterable<T>, PsyLengthy, PsyObject, PsySequential<T>, PsyStreamable<T>
- All Known Implementing Classes:
PsyBlockingQueue
@Type("formalqueue")
public interface PsyFormalQueue<T extends PsyObject>
extends PsyBounded, PsyContainer<T>
The representation of
formalqueue, an abstraction of a queue of objects.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextActionContext action of thedequeueoperator.static final ContextActionContext action of theenqueueoperator.static final ContextActionContext action of thegiveoperator.static final ContextActionContext action of thetakeoperator.Fields inherited from interface PsyBounded
PSY_CAPACITY, PSY_ISFULLFields inherited from interface PsyClearable
PSY_CLEARFields inherited from interface PsyLengthy
PSY_ISEMPTY, PSY_LENGTHFields inherited from interface PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPEFields inherited from interface PsySequential
PSY_FORALLFields inherited from interface PsyStreamable
PSY_STREAM -
Method Summary
Modifier and TypeMethodDescriptionRemoves and returns the head of this queue.voidpsyEnqueue(T o) Inserts an element into this queue.voidpsyTake()Methods inherited from interface Iterable
forEach, iterator, spliteratorMethods inherited from interface PsyBounded
capacity, isFull, psyCapacity, psyIsFullMethods inherited from interface PsyClearable
psyClearMethods inherited from interface PsyContainer
psyNewEmpty, toSyntaxStringHelperMethods inherited from interface PsyIterable
psyStream, psyToArray, psyUniteMethods inherited from interface PsyLengthy
isEmpty, length, psyIsEmpty, psyLengthMethods inherited from interface PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, psyType, toSyntaxString, typeNameMethods inherited from interface PsyStreamable
psyForAll
-
Field Details
-
PSY_DEQUEUE
Context action of thedequeueoperator. -
PSY_ENQUEUE
Context action of theenqueueoperator. -
PSY_GIVE
Context action of thegiveoperator. -
PSY_TAKE
Context action of thetakeoperator.
-
-
Method Details
-
psyDequeue
Removes and returns the head of this queue.- Returns:
- a head of this queue.
- Throws:
PsyErrorException- when this queue is empty.
-
psyEnqueue
Inserts an element into this queue.- Parameters:
o- the element to enqueue.- Throws:
PsyErrorException- when the element can not be inserted without violation of the capacity restrictions.
-
psyTake
- Throws:
PsyErrorException
-
psyGive
- Throws:
PsyErrorException
-