com.meyling.principia.logic.basic
Class BasicPredicateVariablePatternVariable

java.lang.Object
  |
  +--com.meyling.principia.argument.AbstractArgument
        |
        +--com.meyling.principia.argument.PatternVariable
              |
              +--com.meyling.principia.logic.basic.BasicPatternVariable
                    |
                    +--com.meyling.principia.logic.basic.BasicPredicateVariablePatternVariable
All Implemented Interfaces:
Argument, CounterMarker, SubjectVariableMarker

public class BasicPredicateVariablePatternVariable
extends BasicPatternVariable
implements SubjectVariableMarker

Pattern variable, for matching purposes.

Version:
$Revision 0.00.50$
Author:
Michael Meyling

Field Summary
private  Argument argument
          assignment of pattern variable
private  Counter number
          number of pattern variable
 
Fields inherited from class com.meyling.principia.argument.PatternVariable
arguments, content
 
Constructor Summary
BasicPredicateVariablePatternVariable(Argument[] arguments)
          Constructs a pattern variable.
 
Method Summary
 Argument create(Argument[] arguments)
          Create a new Argument with given arguments.
 PatternVariables getPatternVariables()
          Get all pattern variables that occur in this argument.
 boolean isMatching(Argument argument)
          Is the argument matching the pattern variable?
 
Methods inherited from class com.meyling.principia.logic.basic.BasicPatternVariable
toString
 
Methods inherited from class com.meyling.principia.argument.PatternVariable
containsPatternVariables, copy, getArgument, getArgumentSize, getContent, getNumber, setContent
 
Methods inherited from class com.meyling.principia.argument.AbstractArgument
equals, getHighestNumber, getReplacementParents, getSearchParents, hashCode, matches, matches, replace, replace, replace, replaceMatches
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 
Methods inherited from interface com.meyling.principia.logic.basic.SubjectVariableMarker
getNumber
 
Methods inherited from interface com.meyling.principia.argument.Argument
containsPatternVariables, copy, equals, getArgument, getArgumentSize, getReplacementParents, getSearchParents, hashCode, matches, matches, replace, replace, replace, replaceMatches, toString
 
Methods inherited from interface com.meyling.principia.argument.CounterMarker
getNumber
 

Field Detail

number

private final Counter number
number of pattern variable

argument

private Argument argument
assignment of pattern variable
Constructor Detail

BasicPredicateVariablePatternVariable

public BasicPredicateVariablePatternVariable(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
Method Detail

getPatternVariables

public final PatternVariables getPatternVariables()
Description copied from interface: Argument
Get all pattern variables that occur in this argument.
Specified by:
getPatternVariables in interface Argument
Overrides:
getPatternVariables in class AbstractArgument
Following copied from interface: com.meyling.principia.argument.Argument
Returns:
all pattern variables

isMatching

public boolean isMatching(Argument argument)
Is the argument matching the pattern variable? Here always true is returned.
Overrides:
isMatching in class PatternVariable
Parameters:
argument - argument to match pattern variable
Returns:
true

create

public final 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 BasicPatternVariable
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