Package: groovy.lang

## [Java] Class NonEmptySequence

- groovy.lang.NonEmptySequence

-     public class NonEmptySequence
      extends Sequence

  Represents a sequence of one or more objects of a given type. The type can be omitted in which case any type of object can be added.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `NonEmptySequence()` Creates a non-empty sequence with no type restriction.
    `NonEmptySequence(Class type)` Creates a non-empty sequence constrained to the supplied type.
    `NonEmptySequence(Class type, List content)` Creates a non-empty sequence initialized with the supplied content.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public int` | `minimumSize()` * Returns the minimum allowed size for this sequence. * * Returns: the minimum size

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Sequence` | `add, add, addAll, addAll, checkCollectionType, checkType, clear, equals, equals, getMetaClass, getProperty, hashCode, invokeMethod, minimumSize, remove, removeRange, set, set, setMetaClass, setProperty, type`

- - ### Constructor Detail

    - #### public NonEmptySequence()

      Creates a non-empty sequence with no type restriction.

    - #### public NonEmptySequence(Class type)

      Creates a non-empty sequence constrained to the supplied type.

      Parameters:
        `type` - the allowed element type

    - #### public NonEmptySequence(Class type, List content)

      Creates a non-empty sequence initialized with the supplied content.

      Parameters:
        `type` - the allowed element type
        `content` - the initial content

  - ### Method Detail

    - #### public int minimumSize()

      * Returns the minimum allowed size for this sequence. * *

      Returns:
        the minimum size