fcmodeler.mapping
Class AtomicSentence
java.lang.Object
|
+--fcmodeler.mapping.AtomicSentence
- All Implemented Interfaces:
- Sentence
- public final class AtomicSentence
- extends java.lang.Object
- implements Sentence
An atomic sentence in first-order logic. This sentence is of the form
ValueOf(PropertyContainer, Property) = PropertyValue
The Property is represented by a String, and the PropertyValue by an Object. The
PropertyContainer is a variable and is supplied to the evaluate
method.
- Since:
- JDK1.3
- Version:
- $Revision: 1.1 $
- Author:
- Julie Dickerson , Zach Cox
Constructor Summary |
AtomicSentence(java.lang.String property,
java.lang.Object value)
Creates a new AtomicSentence that uses the specified Property and PropertyValue. |
Method Summary |
boolean |
evaluate(diva.util.PropertyContainer container)
Evaluates this sentence using the specified PropertyContainer . |
java.lang.String |
getProperty()
Returns the Property of this atomic sentence. |
java.lang.Object |
getPropertyValue()
Returns the PropertyValue of this atomic sentence. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AtomicSentence
public AtomicSentence(java.lang.String property,
java.lang.Object value)
- Creates a new
AtomicSentence
that uses the specified Property and PropertyValue.
- Parameters:
property
- the Property of this atomic sentence.value
- the PropertyValue of this atomic sentence.
evaluate
public boolean evaluate(diva.util.PropertyContainer container)
- Evaluates this sentence using the specified
PropertyContainer
.
- Specified by:
evaluate
in interface Sentence
- Parameters:
container
- the PropertyContainer
used to evaluate this sentence.- Returns:
true
if the Property of the specified PropertyContainer
equals the PropertyValue; false
otherwise.
getProperty
public java.lang.String getProperty()
- Returns the Property of this atomic sentence.
- Returns:
- the Property of this atomic sentence.
getPropertyValue
public java.lang.Object getPropertyValue()
- Returns the PropertyValue of this atomic sentence.
- Returns:
- the PropertyValue of this atomic sentence.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object