package ilog.language.design.types;

/**
 * @version     Last modified on Fri Apr 19 17:24:24 2002 by paulin
 * @version          modified on Sat Mar 09 21:17:45 2002 by hak
 * @version          modified on Sat Feb 16 16:28:01 2002 by hak
 * @author      <a href="mailto:hak@ilog.fr">Hassan A&iuml;t-Kaci</a>
 * @copyright   &copy; 2000-2002 <a href="http://www.ilog.fr/">ILOG, S.A.</a>
 */


/**
 * This is the class of constant types that are also collection types.
 */

public class CollectionTypeConstant extends TypeConstant implements Collection
{
  private Type _baseType;

  public CollectionTypeConstant (String name, Type type)
    {
      super(name);
      _baseType = type;
    }

  /**
   * Returns the undereferenced base type.
   */
  public Type baseTypeRef ()
    {
      return _baseType;
    }

  /**
   * Returns the base type's value; that is, the current type binding of the
   * collection's elements.
   */
  public Type baseType ()
    {
      return _baseType.value();
    }
}
