SimJava
v2.0

eduni.simanim
Class Param_type

java.lang.Object
  |
  +--eduni.simanim.Param_type

public class Param_type
extends java.lang.Object

An animation parameter type. Stores an array of strings representing the different states of a parameter, e.g. "Idle", "Busy" etc.

You need to specify a parameter type in order to get a parameter to display on a timing diagram.

Example code to add a parameter type from a user's entity constructor is below.   String[] wstate = {"idle","busy"};   add_param(new Anim_param( "State",           Anim_param.STATE,           new Param_type("wstate", wstate)));


Constructor Summary
Param_type(java.lang.String tp, java.lang.String[] vals)
           
 
Method Summary
 int getIndex(java.lang.String s)
          Returns the state index given a state name (or -1 if the state name isn't found)
 java.lang.StringBuffer getSpec()
          Returns type spec in form etc
 java.lang.String getType()
          Returns the type name
 java.lang.String[] getVals()
          Returns the array of strings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Param_type

public Param_type(java.lang.String tp,
                  java.lang.String[] vals)
Method Detail

getVals

public java.lang.String[] getVals()
Returns the array of strings

getType

public java.lang.String getType()
Returns the type name

getIndex

public int getIndex(java.lang.String s)
Returns the state index given a state name (or -1 if the state name isn't found)

getSpec

public java.lang.StringBuffer getSpec()
Returns type spec in form etc

SimJava
v2.0

The University of Edinburgh, 2002