- All Superinterfaces:
PsyObject
- All Known Subinterfaces:
PsyBounded,PsyContainer<T>,PsyFormalArray<T>,PsyFormalDict<V>,PsyFormalQueue<T>,PsyFormalSet<T>,PsyTextual
- All Known Implementing Classes:
PsyArray,PsyBitArray,PsyBitSet,PsyBlockingQueue,PsyCommand,PsyConfigDict,PsyDict,PsyErrorDict,PsyModule,PsyName,PsyNamespace,PsyProc,PsySet,PsyString,PsySystemDict
The representation of
lengthy, an object that has length in some sense. Usually the
length is the number of elements in the container.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextActionContext action of theisemptyoperator.static final ContextActionContext action of thelengthoperator.Fields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TONAME, PSY_TOSTRING, PSY_TYPE -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanisEmpty()Returns a boolean indicating if this container is empty (has zero length).intlength()Returns a length of this object.default PsyBooleanReturns abooleanindicating if this container is empty (has zero length).default PsyIntegerReturns anintegerrepresenting the length of this object.Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, toSyntaxString, typeName
-
Field Details
-
PSY_ISEMPTY
Context action of theisemptyoperator. -
PSY_LENGTH
Context action of thelengthoperator.
-
-
Method Details
-
length
int length()Returns a length of this object.- Returns:
- a length.
-
isEmpty
default boolean isEmpty()Returns a boolean indicating if this container is empty (has zero length).- Returns:
true, if this container is empty, andfalseotherwise.
-
psyLength
Returns anintegerrepresenting the length of this object.- Returns:
- an
integerlength.
-
psyIsEmpty
Returns abooleanindicating if this container is empty (has zero length).- Returns:
- a
booleanresult.
-