nz.ac.waikato.mcennis.rat.graph.descriptors
Class BasicParameter

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.graph.descriptors.BasicParameter
All Implemented Interfaces:
Parameter, ParameterInternal

public class BasicParameter
extends java.lang.Object
implements ParameterInternal

Base implementation of all the parameter interfaces.


Constructor Summary
BasicParameter()
          Creates a new instance of BasicParameter
 
Method Summary
 void add(java.util.List value)
           
 void add(java.lang.Object o)
           
 boolean check(Parameter type)
           
 boolean check(Property property)
           
 boolean check(java.lang.String type, java.util.List value)
           
 boolean check(java.lang.String type, java.lang.Object value)
           
 void clear()
           
 ParameterInternal duplicate()
           
 java.lang.Object get()
           
 java.lang.String getDescription()
           
 java.lang.Class getParameterClass()
           
 SyntaxObject getRestrictions()
           
 java.lang.String getType()
          Name of this parameter.
 java.util.List<java.lang.Object> getValue()
          Returns the current value of this object.
 boolean isStructural()
          Will modification of this parameter cause a structural change in the component that has it?
 ParameterInternal prototype()
           
 void set(java.util.List value)
           
 void set(java.lang.Object value)
           
 void set(Property o)
           
 void setDescription(java.lang.String d)
           
 void setParameterClass(java.lang.Class type)
          Sets the Class that this parameter will hold.
 void setRestrictions(SyntaxObject syntax)
           
 void setStructural(boolean b)
          Set this as a parameter whose changes means the application structure needs to be rebuilt.
 void setType(java.lang.String name)
          Sets the name that this parameter will be accessed by
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicParameter

public BasicParameter()
Creates a new instance of BasicParameter

Method Detail

setStructural

public void setStructural(boolean b)
Description copied from interface: ParameterInternal
Set this as a parameter whose changes means the application structure needs to be rebuilt. This is of primary interest for GUI development knowing whether a parameter modification means that dependancy checks need to be performed again.

Specified by:
setStructural in interface ParameterInternal
Parameters:
b - is a structural parameter or not.

isStructural

public boolean isStructural()
Description copied from interface: Parameter
Will modification of this parameter cause a structural change in the component that has it?

Specified by:
isStructural in interface Parameter
Returns:
is a structural parameter.

set

public void set(Property o)
Specified by:
set in interface Parameter

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface Parameter

setDescription

public void setDescription(java.lang.String d)
Specified by:
setDescription in interface ParameterInternal

setType

public void setType(java.lang.String name)
Description copied from interface: ParameterInternal
Sets the name that this parameter will be accessed by

Specified by:
setType in interface ParameterInternal
Parameters:
name - name of the parameter

setRestrictions

public void setRestrictions(SyntaxObject syntax)
Specified by:
setRestrictions in interface ParameterInternal

getRestrictions

public SyntaxObject getRestrictions()
Specified by:
getRestrictions in interface Parameter
Specified by:
getRestrictions in interface ParameterInternal

add

public void add(java.lang.Object o)
Specified by:
add in interface Parameter

getType

public java.lang.String getType()
Description copied from interface: Parameter
Name of this parameter. Typically, this value in a Properties object sets this parameter

Specified by:
getType in interface Parameter
Returns:
name of this parameter

getValue

public java.util.List<java.lang.Object> getValue()
Description copied from interface: Parameter
Returns the current value of this object. Returns null if no value has been set and no default value exists. Typically, a parameter has a default value that will be returned.

Specified by:
getValue in interface Parameter
Returns:
value of this paramter.

getParameterClass

public java.lang.Class getParameterClass()
Specified by:
getParameterClass in interface Parameter

setParameterClass

public void setParameterClass(java.lang.Class type)
Description copied from interface: ParameterInternal
Sets the Class that this parameter will hold. This restriction can be a hard restriction or a soft contract depending on the implementation.

Specified by:
setParameterClass in interface ParameterInternal
Parameters:
type - Class expected for the parameter's value

check

public boolean check(Property property)
Specified by:
check in interface Parameter

check

public boolean check(java.lang.String type,
                     java.lang.Object value)
Specified by:
check in interface Parameter

check

public boolean check(Parameter type)
Specified by:
check in interface Parameter

clear

public void clear()
Specified by:
clear in interface Parameter

add

public void add(java.util.List value)
Specified by:
add in interface Parameter

check

public boolean check(java.lang.String type,
                     java.util.List value)
Specified by:
check in interface Parameter

duplicate

public ParameterInternal duplicate()
Specified by:
duplicate in interface Parameter
Specified by:
duplicate in interface ParameterInternal

prototype

public ParameterInternal prototype()
Specified by:
prototype in interface Parameter

get

public java.lang.Object get()
Specified by:
get in interface Parameter

set

public void set(java.lang.Object value)
Specified by:
set in interface Parameter

set

public void set(java.util.List value)
Specified by:
set in interface Parameter

Get Relational Analysis Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads