BagType (API documentation of hlt.language packages)
Date: 2013-01-30

hlt.language.design.types

## Class BagType

- java.lang.Object
- - hlt.language.design.types.Type
  - - hlt.language.design.types.StaticType
    - - hlt.language.design.types.ConstructedType
      - - hlt.language.design.types.CollectionType
        - - hlt.language.design.types.BagType

- All Implemented Interfaces:
    Collection, Valuable

      public class BagType
      extends CollectionType

  This is the class denoting the type of bags. Types of this kind consist of bag types whose elements are of any base type (including bags - thus enabling higher-order bags - and type parameters - thus enabling polymorphic bags).

- - ### Field Summary

    - ### Fields inherited from class hlt.language.design.types.Type

      `ARRAY, BAG, BOOLEAN, BOXABLE, CHAR, CLASS, COLLECTION, CONSTANT, DEFINED, FUNCTION, INT, INT_RANGE, INT_SORT, LIST, NAMED_TUPLE, OBJECT_SORT, PARAMETER, REAL, REAL_RANGE, REAL_SORT, SET, STRING, TUPLE, VOID, VOID_SORT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BagType()` Constructs a polymorphic bag type; i.e., one whose base type is a type parameter.
    `BagType(Type baseType)` Constructs a bag type with the specified base type.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte` | `kind()` Returns the constant identifying bag types; i.e., `Type.BAG`.
    `CollectionType` | `newCollectionType(Type basetype)` Returns a new bag type with the specified base type.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class hlt.language.design.types.CollectionType

      `baseType, baseTypeRef, checkOccurrence, copy, eqCode, flatten, getParameters, instantiate, isEqualTo, isEqualTo, isPolymorphic, numberOfTypeComponents, setTypeRefComponent, typeRefComponent, unify, unify`

    - ### Methods inherited from class hlt.language.design.types.Type

      `actualType, array, array, BOOLEAN, BOXED_BOOLEAN, BOXED_CHAR, BOXED_INT, BOXED_REAL, boxSort, CHAR, copy, curry, equals, findValue, getParameters, getValue, INT, is, isBag, isBoolean, isBoxedType, isChar, isCollection, isGlobalUnsafe, isInt, isList, isPrimitive, isReal, isSet, isString, isVoid, kindString, rank, REAL, resetNames, setBoxed, shadowType, sort, standardize, toFullString, toQuantifiedString, toQuantifiedString, typeComponent, unwrapper, value, wrapper`

    - ### Methods inherited from class java.lang.Object

      `getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### BagType

          public BagType()

      Constructs a polymorphic bag type; i.e., one whose base type is a type parameter.

    - #### BagType

          public BagType(Type baseType)

      Constructs a bag type with the specified base type.

  - ### Method Detail

    - #### newCollectionType

          public final CollectionType newCollectionType(Type basetype)

      Returns a new bag type with the specified base type.
      Specified by:
        `newCollectionType` in class `CollectionType`

    - #### kind

          public final byte kind()

      Returns the constant identifying bag types; i.e., `Type.BAG`.
      Specified by:
        `kind` in class `Type`

    - #### toString

          public final java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`