public abstract class SimpleValueCondition extends Object implements HGQueryCondition, HGAtomPredicate
Basic class for conditions examining individual primitive values.
Modifier and Type | Field and Description |
---|---|
protected ComparisonOperator |
operator |
protected Ref<Object> |
value |
Constructor and Description |
---|
SimpleValueCondition() |
SimpleValueCondition(Object value) |
SimpleValueCondition(Object value,
ComparisonOperator operator) |
SimpleValueCondition(Ref<Object> value,
ComparisonOperator operator) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
compareToValue(HyperGraph graph,
Object x)
We are using the standard Java
java.lang.Comparable interface here
on the value parameter. |
boolean |
equals(Object x) |
ComparisonOperator |
getOperator() |
Object |
getValue() |
Ref<Object> |
getValueReference() |
int |
hashCode() |
void |
setOperator(ComparisonOperator operator) |
void |
setValue(Object value) |
void |
setValueReference(Ref<Object> value) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
satisfies
protected ComparisonOperator operator
public SimpleValueCondition()
public SimpleValueCondition(Object value)
public SimpleValueCondition(Object value, ComparisonOperator operator)
public SimpleValueCondition(Ref<Object> value, ComparisonOperator operator)
protected boolean compareToValue(HyperGraph graph, Object x)
java.lang.Comparable
interface here
on the value
parameter. The passed in type is ignored, but is
part of the method signature because it is still not clear how exactly
value orderings are to be treated. All Java primitive types are comparable and
our primitive types are nothing more than the Java primitive types. Perhaps we
need an "ordered" interface for atom types. Of course values can always implement
the java.lang.Comparable, but this breaks HyperGraph paradigm where such semantics
are defined by the types, not their values.public Object getValue()
public void setValue(Object value)
public ComparisonOperator getOperator()
public void setOperator(ComparisonOperator operator)
Copyright © 2015. All rights reserved.