Package repast.simphony.parameter
Class DefaultSchema
java.lang.Object
repast.simphony.parameter.DefaultSchema
- All Implemented Interfaces:
- Schema
Default implementation of Schema.
- Version:
- $Revision$ $Date$
- Author:
- Nick Collier
- 
Constructor SummaryConstructorsConstructorDescriptionCreates an empty Schema.DefaultSchema(Pair<String, Class>[] pairs) Creates a schema from an array of String, Class pairs.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddConstraint(String name, List constrainingList) Constains the value of the named to parameter to those in the list.voidaddConstraint(String name, SteppedRange constrainingRange) Constrains the value of the named parameter to those in the specified range.voidaddConvertor(String name, StringConverter converter) Adds a converter to convert the named parameter back and forth to a String.voidAdds a schema entry to this Schema.booleanReturns true if this schema contains contains the specified parameter name, otherwise false.getDetails(String paramName) Gets the schema for the specified parameter.Gets an iterable over a list of parameter names.booleanremoveEntry(String name) Removes a schema entry from this Schemaintsize()Gets the number of parameters in this schema.booleanValidates the specified object against the type info contained for the parameter name.
- 
Constructor Details- 
DefaultSchemapublic DefaultSchema()Creates an empty Schema.
- 
DefaultSchemaCreates a schema from an array of String, Class pairs.- Parameters:
- pairs- first item in pair is parameter name, second is parameter type
 
 
- 
- 
Method Details- 
removeEntryRemoves a schema entry from this Schema- Parameters:
- name- the name of the parameter
- Returns:
- whether or not the removal was successful
 
- 
addEntryAdds a schema entry to this Schema.- Parameters:
- name- the name of the parameter
- type- the type of the parameter
- defValue- the default value of hte parameter.
 
- 
addConstraintConstains the value of the named to parameter to those in the list.- Parameters:
- name- the name of the parameter
- constrainingList- a list containing the possible values for the named parameter
 
- 
addConvertorAdds a converter to convert the named parameter back and forth to a String.- Parameters:
- name- the name of the parameter
- converter- the converter
 
- 
addConstraintConstrains the value of the named parameter to those in the specified range.- Parameters:
- name- the name of the parmaeter
- constrainingRange- a range of the possible values for the named parameter
 
- 
getDetailsGets the schema for the specified parameter.- Specified by:
- getDetailsin interface- Schema
- Parameters:
- paramName- the name of the parameter
- Returns:
- the schema for the specified parameter
 
- 
parameterNamesGets an iterable over a list of parameter names.- Specified by:
- parameterNamesin interface- Schema
- Returns:
- an iterable over a list of parameter names.
 
- 
validateValidates the specified object against the type info contained for the parameter name.
- 
containsReturns true if this schema contains contains the specified parameter name, otherwise false.
- 
sizepublic int size()Gets the number of parameters in this schema.
 
-