uk.ac.man.cs.rainbow.datamodel
Class Type.Vector

java.lang.Object
  |
  +--uk.ac.man.cs.rainbow.datamodel.Type
        |
        +--uk.ac.man.cs.rainbow.datamodel.Type.Vector
All Implemented Interfaces:
Argument, Data.List.T, Serializable, Type
Enclosing class:
Type

public static class Type.Vector
extends Type
implements Data.List.T

The class of types of vectors.

See Also:
Data.List, Serialized Form

Inner classes inherited from class uk.ac.man.cs.rainbow.datamodel.Type
Type.Boolean, Type.Enum, Type.Integer, Type.Tuple, Type.Union, Type.Vector
 
Field Summary
protected  int memberCount
           
protected  Type memberType
           
 
Constructor Summary
Type.Vector(Type type, int length)
           
 
Method Summary
 boolean equals(Type t)
          Test for equality between types.
 Type index(int idx)
          Get the type of the idxth value.
 int length()
          Get the number of values that the type requires the list to have.
 String render(Expression[] contents)
          Render a list, given the values that the list is defined by.
 String toString()
          Render the type as a string.
 
Methods inherited from class uk.ac.man.cs.rainbow.datamodel.Type
compatableWith, equals, parse, parse, subst
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

memberType

protected Type memberType

memberCount

protected int memberCount
Constructor Detail

Type.Vector

public Type.Vector(Type type,
                   int length)
Method Detail

toString

public String toString()
Description copied from class: Type
Render the type as a string. Must be specified by real types.
Overrides:
toString in class Type

render

public String render(Expression[] contents)
Description copied from interface: Data.List.T
Render a list, given the values that the list is defined by.
Specified by:
render in interface Data.List.T

index

public Type index(int idx)
Description copied from interface: Data.List.T
Get the type of the idxth value.
Specified by:
index in interface Data.List.T

length

public int length()
Description copied from interface: Data.List.T
Get the number of values that the type requires the list to have.
Specified by:
length in interface Data.List.T

equals

public boolean equals(Type t)
Description copied from class: Type
Test for equality between types.
Overrides:
equals in class Type