org.semanticdesktop.aperture.datasource.config
Class SubstringCondition
java.lang.Object
org.semanticdesktop.aperture.datasource.config.SubstringCondition
- Direct Known Subclasses:
- SubstringCondition.Contains, SubstringCondition.DoesNotContain, SubstringCondition.EndsWith, SubstringCondition.StartsWith
public abstract class SubstringCondition
- extends Object
Instances of this class indicate how a substring test needs to be performed and are able to evaluate
the test. Subclasses embody a particular kind of substring test, e.g. "starts with", "ends with" or
"contains".
Method Summary |
boolean |
equals(Object obj)
|
int |
hashCode()
|
abstract boolean |
test(String string,
String substring)
Tests the substring condition embodied by the implementing class on a String. |
abstract Node |
toNode()
Return the Value used to encode this SubstringCondition in an RDF model. |
STARTS_WITH
public static final SubstringCondition.StartsWith STARTS_WITH
ENDS_WITH
public static final SubstringCondition.EndsWith ENDS_WITH
CONTAINS
public static final SubstringCondition.Contains CONTAINS
DOES_NOT_CONTAIN
public static final SubstringCondition.DoesNotContain DOES_NOT_CONTAIN
SubstringCondition
public SubstringCondition()
test
public abstract boolean test(String string,
String substring)
- Tests the substring condition embodied by the implementing class on a String.
- Parameters:
string
- The String to test the substring condition on.substring
- The String to test the substring condition with.
- Returns:
- 'true' when the string contains the substring in the way embodied by the implementing
class, 'false' otherwise.
toNode
public abstract Node toNode()
- Return the Value used to encode this SubstringCondition in an RDF model.
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2010 Aperture Development Team. All Rights Reserved.