net.sourceforge.nrl.parser.operators
Class Operators

java.lang.Object
  extended by net.sourceforge.nrl.parser.operators.PropertyAwareObject
      extended by net.sourceforge.nrl.parser.operators.Operators
All Implemented Interfaces:
Serializable, IOperators

public class Operators
extends PropertyAwareObject
implements IOperators

A basic implementation of an operator collection.

See Also:
Serialized Form

Field Summary
static String DOCUMENTATION_CHANGED
          Event - documentation changed.
static String MODEL_FILE_NAMES_CHANGED
          Event - model file name list changed.
static String OPERATOR_LIST_CHANGED
          Event - operator list changed.
 
Constructor Summary
Operators()
           
 
Method Summary
 void addModelFileName(String fileName)
           
 void addOperator(IOperator operator)
          Add an operator to the end of the list.
 void addOperator(IOperator operator, IOperator before)
          Add an operator before another one
 void clear()
           
 String getDocumentation()
          Return the operator documentation, may be null.
 List<String> getModelFileNames()
          The list of referenced models.
 IOperator getOperator(String name)
          Get an operator by name.
 List<IOperator> getOperators()
          Return all operators in this collection.
 void removeModelFileName(String fileName)
           
 void removeOperator(IOperator operator)
           
 List<NRLError> resolveModelReferences(IModelCollection models)
          Resolve all parameter type and return type references against models.
 void setDocumentation(String documentation)
           
 
Methods inherited from class net.sourceforge.nrl.parser.operators.PropertyAwareObject
addPropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOCUMENTATION_CHANGED

public static final String DOCUMENTATION_CHANGED
Event - documentation changed.

See Also:
Constant Field Values

MODEL_FILE_NAMES_CHANGED

public static final String MODEL_FILE_NAMES_CHANGED
Event - model file name list changed.

See Also:
Constant Field Values

OPERATOR_LIST_CHANGED

public static final String OPERATOR_LIST_CHANGED
Event - operator list changed.

See Also:
Constant Field Values
Constructor Detail

Operators

public Operators()
Method Detail

addModelFileName

public void addModelFileName(String fileName)

addOperator

public void addOperator(IOperator operator)
Add an operator to the end of the list.

Parameters:
operator - the operator

addOperator

public void addOperator(IOperator operator,
                        IOperator before)
Add an operator before another one

Parameters:
operator - operator to add
before - operator to add before. If this is null or not in the list, then "operator" is added at the front

clear

public void clear()

getDocumentation

public String getDocumentation()
Description copied from interface: IOperators
Return the operator documentation, may be null.

Specified by:
getDocumentation in interface IOperators
Returns:
the documentation

getModelFileNames

public List<String> getModelFileNames()
Description copied from interface: IOperators
The list of referenced models.

Specified by:
getModelFileNames in interface IOperators
Returns:
the list

getOperator

public IOperator getOperator(String name)
Description copied from interface: IOperators
Get an operator by name. Returns null if not found.

Specified by:
getOperator in interface IOperators
Parameters:
name - the name
Returns:
the operator or null

getOperators

public List<IOperator> getOperators()
Description copied from interface: IOperators
Return all operators in this collection.

Specified by:
getOperators in interface IOperators
Returns:
a list of IOperator.

removeModelFileName

public void removeModelFileName(String fileName)

removeOperator

public void removeOperator(IOperator operator)

resolveModelReferences

public List<NRLError> resolveModelReferences(IModelCollection models)
Description copied from interface: IOperators
Resolve all parameter type and return type references against models.

Specified by:
resolveModelReferences in interface IOperators
Parameters:
models - the models
Returns:
any errors encountered

setDocumentation

public void setDocumentation(String documentation)


Copyright © 2006-2010 Christian Nentwich and others