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, PsyCommand, PsyConfigDict, PsyDict, PsyErrorDict, PsyModule, PsyName, PsyNamespace, PsyProc, PsySet, PsyString, 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.
    • isEmpty

      default boolean isEmpty()
      Returns a boolean indicating if this container is empty (has zero length).
      Returns:
      true, if this container is empty, and false otherwise.
    • psyLength

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

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