Interface PsyLengthy

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, PsyConfigDict, PsyDict, PsyEnvironment, PsyModule, PsyName, PsyNamespace, PsyProc, PsySet, PsyString, PsyStringBuffer, PsySystemDict

@Type("lengthy") public interface PsyLengthy extends PsyObject
The representation of lengthy, an object that has length in some sense. Usually the length is the number of elements in the container.
  • Field Details

  • Method Details

    • length

      int length()
      Returns a length of this object.
      Returns:
      a length of this object
    • isEmpty

      default boolean isEmpty()
    • psyLength

      default PsyInteger psyLength()
      Returns an integer representing the length of this object.
      Returns:
      an integer representing the length of this object
    • psyIsEmpty

      default PsyBoolean psyIsEmpty()
      Returns a boolean indicating if this container is empty (has zero length).
      Returns:
      a boolean indicating if this container is empty (has zero length)