Package coneforest.psylla.core
Class PsyBlockingQueue
java.lang.Object
coneforest.psylla.core.PsyBlockingQueue
- All Implemented Interfaces:
PsyBounded
,PsyClearable
,PsyCloseable
,PsyContainer<PsyObject>
,PsyConvertableToName
,PsyConvertableToString
,PsyFormalQueue<PsyObject>
,PsyIterable<PsyObject>
,PsyLengthy
,PsyObject
,PsySequential<PsyObject>
,PsyStreamable<PsyObject>
,Iterable<PsyObject>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
capacity()
Returns the capacity of this container.iterator()
int
length()
Returns the number of elements in this queue.void
psyClear()
Clear this object.void
psyClose()
Closes this object.Removes and returns the head of this queue.void
Inserts an element into this queue.void
psyTake()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface coneforest.psylla.core.PsyBounded
isFull, psyCapacity, psyIsFull
Methods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmpty, toSyntaxStringHelper
Methods inherited from interface coneforest.psylla.core.PsyIterable
psyToArray, psyUnite
Methods inherited from interface coneforest.psylla.core.PsyLengthy
isEmpty, 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.PsyStreamable
psyForAll
-
Field Details
-
OPERATORS
-
-
Constructor Details
-
PsyBlockingQueue
- Throws:
PsyErrorException
-
-
Method Details
-
length
public int length()Returns the number of elements in this queue.- Specified by:
length
in interfacePsyLengthy
- Returns:
- the number of elements in this queue.
-
psyGive
- Specified by:
psyGive
in interfacePsyFormalQueue<PsyObject>
- Throws:
PsyErrorException
-
psyEnqueue
Description copied from interface:PsyFormalQueue
Inserts an element into this queue.- Specified by:
psyEnqueue
in interfacePsyFormalQueue<PsyObject>
- Parameters:
o
- the element to enqueue.- Throws:
PsyErrorException
- when the element can not be inserted without violation of the capacity restrictions.
-
psyDequeue
Description copied from interface:PsyFormalQueue
Removes and returns the head of this queue.- Specified by:
psyDequeue
in interfacePsyFormalQueue<PsyObject>
- Returns:
- a head of this queue.
- Throws:
PsyErrorException
- when this queue is empty.
-
psyTake
- Specified by:
psyTake
in interfacePsyFormalQueue<PsyObject>
- Throws:
PsyErrorException
-
psyClose
public void psyClose()Description copied from interface:PsyCloseable
Closes this object.- Specified by:
psyClose
in interfacePsyCloseable
-
psyClear
public void psyClear()Description copied from interface:PsyClearable
Clear this object.- Specified by:
psyClear
in interfacePsyClearable
-
iterator
-
capacity
public int capacity()Description copied from interface:PsyBounded
Returns the capacity of this container.- Specified by:
capacity
in interfacePsyBounded
- Returns:
- the capacity of this container.
-
psyStream
- Specified by:
psyStream
in interfacePsyIterable<PsyObject>
- Specified by:
psyStream
in interfacePsyStreamable<PsyObject>
-