com.meyling.principia.logic.basic
Class BasicPatternVariable
java.lang.Object
|
+--com.meyling.principia.argument.AbstractArgument
|
+--com.meyling.principia.argument.PatternVariable
|
+--com.meyling.principia.logic.basic.BasicPatternVariable
- All Implemented Interfaces:
- Argument, CounterMarker
- Direct Known Subclasses:
- BasicFormulaPatternVariable, BasicPredicateVariablePatternVariable
- public class BasicPatternVariable
- extends PatternVariable
- implements CounterMarker
Pattern variable, for matching purposes.
- Version:
- $Revision 0.00.50$
- Author:
- Michael Meyling
| Methods inherited from class com.meyling.principia.argument.AbstractArgument |
equals, getHighestNumber, getPatternVariables, getReplacementParents, getSearchParents, hashCode, matches, matches, replace, replace, replace, replaceMatches |
| Methods inherited from interface com.meyling.principia.argument.Argument |
containsPatternVariables, copy, equals, getArgument, getArgumentSize, getPatternVariables, getReplacementParents, getSearchParents, hashCode, matches, matches, replace, replace, replace, replaceMatches |
number
private final Counter number
- number of pattern variable
argument
private Argument argument
- assignment of pattern variable
BasicPatternVariable
public BasicPatternVariable(Argument[] arguments)
throws ArgumentException
- Constructs a pattern variable.
- Parameters:
arguments - first argument is number of this pattern
variable- Throws:
ArgumentException - if there is not exactly one
argument that is an instance of Counter
create
public Argument create(Argument[] arguments)
throws ArgumentException
- Description copied from interface:
Argument
- Create a new Argument with given arguments.
- Specified by:
create in interface Argument- Overrides:
create in class PatternVariable
- Following copied from interface:
com.meyling.principia.argument.Argument
- Parameters:
arguments - with these arguments the operator should
be created- Returns:
- new constructed Argument
- Throws:
ArgumentException - if creation failed
toString
public final String toString()
- Description copied from interface:
Argument
- Get the argument in
String form.
- Specified by:
toString in interface Argument- Overrides:
toString in class PatternVariable
- Following copied from interface:
com.meyling.principia.argument.Argument
- Returns:
- readable formula