Package coneforest.psylla.core
Interface PsyQueuelike<T extends PsyObject>
-
- Type Parameters:
T
- a type of contained objects.
- All Superinterfaces:
Iterable<T>
,PsyBounded
,PsyClearable
,PsyContainer<T>
,PsyConvertableToName
,PsyConvertableToString
,PsyIterable<T>
,PsyLengthy
,PsyObject
,PsyStreamlike<T>
- All Known Implementing Classes:
PsyBlockingQueue
public interface PsyQueuelike<T extends PsyObject> extends PsyBounded, PsyContainer<T>
A representation of Ψ-queuelike
, an abstraction of a queue of Ψ-object
s.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
psyDequeue()
Removes and returns the head of this queue.void
psyEnqueue(T o)
Inserts an element into this queue.void
psyGive(T o)
T
psyTake()
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface coneforest.psylla.core.PsyBounded
capacity, isFull, psyCapacity, psyIsFull
-
Methods inherited from interface coneforest.psylla.core.PsyClearable
psyClear
-
Methods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmpty
-
Methods inherited from interface coneforest.psylla.core.PsyIterable
psyCount, psyFilter, psyForAll, psyMap, psyStream, psyToArray, psyUnite
-
Methods inherited from interface coneforest.psylla.core.PsyLengthy
isEmpty, length, psyIsEmpty, psyLength
-
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, toSyntaxString, typeName
-
Methods inherited from interface coneforest.psylla.core.PsyStreamlike
iterator, psyConcat
-
-
-
-
Method Detail
-
psyDequeue
T psyDequeue() throws PsyException
Removes and returns the head of this queue.- Returns:
- a head of this queue.
- Throws:
PsyException
- when this queue is empty.
-
psyEnqueue
void psyEnqueue(T o) throws PsyException
Inserts an element into this queue.- Parameters:
o
- the element to enqueue.- Throws:
PsyException
- when the element can not be inserted without violation of the capacity restrictions.
-
psyTake
T psyTake() throws PsyException
- Throws:
PsyException
-
psyGive
void psyGive(T o) throws PsyException
- Throws:
PsyException
-
-