org.vizzini.ai.logic
Class PropertyArgument
java.lang.Object
org.vizzini.util.AbstractBean
org.vizzini.ai.logic.AbstractArgument
org.vizzini.ai.logic.PropertyArgument
- All Implemented Interfaces:
- Cloneable, IArgument
public class PropertyArgument
- extends AbstractArgument
Provides a property argument for use in sentences in the logic system. This
argument obtains its value from a property of the context item. Instances of
this class are obtained from ArgumentFactory.create()
.
- Since:
- v0.2
- Version:
- v0.2
- Author:
- Jeffrey M. Thompson
- See Also:
ArgumentFactory.create(java.lang.Object)
PropertyArgument
protected PropertyArgument(String propertyName)
- Construct this object.
- Parameters:
propertyName
- Property name.- Since:
- v0.2
getArgumentType
public ArgumentType getArgumentType()
- Return the arg type.
- Since:
- v0.2
getPropertyName
public String getPropertyName()
- Returns:
- Return propertyName.
- Since:
- v0.2
getValue
public Object getValue(Object contextItem)
throws LogicException
- Return the value of this argument using the given context item. As a
special case, the property name "this" simply returns the given context
item.
- Parameters:
contextItem
- Context item which is the source of the property
value.
- Throws:
LogicException
- Since:
- v0.2
setPropertyName
protected void setPropertyName(String propertyName)
- Parameters:
propertyName
- The propertyName to set.- Since:
- v0.2
Copyright © 2007 Vizzini.org. All Rights Reserved.
|
2007.12.25.03.00.02 |