public class GetObjectsByLocatorPrefixOperation extends RankingSingleQueryOperation
QueryOperation.DataEqualOperation
AbstractOperation.OperationConstructor, AbstractOperation.OperationName
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
locatorPrefix
The locator prefix of the desired objects
|
suppData, uuidOperationComparator
Constructor and Description |
---|
GetObjectsByLocatorPrefixOperation(java.lang.String locatorPrefix)
Create a new instance of GetObjectsByLocatorPrefixOperation with the specified locator prefix.
|
GetObjectsByLocatorPrefixOperation(java.lang.String locatorPrefix,
LocalAbstractObject queryObjectForDistances)
Create a new instance of GetObjectsByLocatorPrefixOperation with the specified locator prefix.
|
GetObjectsByLocatorPrefixOperation(java.lang.String locatorPrefix,
LocalAbstractObject queryObjectForDistances,
AnswerType answerType)
Create a new instance of GetObjectsByLocatorPrefixOperation with the specified locator prefix.
|
GetObjectsByLocatorPrefixOperation(java.lang.String locatorPrefix,
LocalAbstractObject queryObjectForDistances,
AnswerType answerType,
int maxAnswerSize)
Create a new instance of GetObjectsByLocatorPrefixOperation with the specified locator prefix.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
dataEqualsImpl(QueryOperation obj)
Indicates whether some other operation has the same data as this one.
|
int |
dataHashCode()
Returns a hash code value for the data of this operation.
|
int |
evaluate(AbstractObjectIterator<? extends LocalAbstractObject> objects)
Evaluate this query on a given set of objects.
|
java.lang.Class<? extends RankedAbstractObject> |
getAnswerClass()
Returns the class of objects this operation stores in its answer.
|
java.lang.Object |
getArgument(int index)
Returns argument that was passed while constructing instance.
|
int |
getArgumentCount()
Returns number of arguments that were passed while constructing this instance.
|
java.lang.String |
getLocatorPrefix()
Returns the locator prefix this query searches for.
|
addToAnswer, addToAnswer, clearSurplusData, clone, createOperation, getQueryObject, isStoringMetaDistances
addToAnswer, endOperation, getAnswer, getAnswer, getAnswerCollectionClass, getAnswerCollectionClone, getAnswerComparator, getAnswerCount, getAnswerDistance, getAnswerDistanceRestricted, getAnswerDistanceRestricted, getAnswerMaximalCapacity, getAnswerObjects, getAnswerThreshold, getLastAnswer, getSubAnswer, getSubAnswer, getSubAnswerCount, isAnswerFull, resetAnswer, setAnswerCollection, setAnswerIgnoringDuplicates, setAnswerThresholdComputation, setAnswerThresholdComputation, updateFrom, updateFrom
appendErrorCode, clone, dataEquals, endOperation, getAllSubAnswers, getAnswerType, getQueryAnswer, iterator, setAnswerType, wasSuccessful
appendArguments, containsParameter, createOperation, equals, getAnnotatedConstructor, getAnnotatedConstructor, getArgumentString, getConstructorArgumentDescriptions, getConstructorArgumentDescriptions, getConstructorArguments, getConstructorArguments, getConstructorDescription, getErrorCode, getName, getName, getOperationID, getParameter, getParameter, getParameter, getParameterCount, getParameterMap, getParameterNames, getRequiredParameter, getRequiredParameter, hashCode, isErrorCode, isFinished, removeParameter, setParameter, toString
protected final java.lang.String locatorPrefix
public GetObjectsByLocatorPrefixOperation(java.lang.String locatorPrefix, LocalAbstractObject queryObjectForDistances, AnswerType answerType, int maxAnswerSize)
locatorPrefix
- the locator prefix to search forqueryObjectForDistances
- the query object to use for computing distancesanswerType
- the type of objects this operation stores in its answermaxAnswerSize
- the limit for the number of objects kept in this operation answerpublic GetObjectsByLocatorPrefixOperation(java.lang.String locatorPrefix, LocalAbstractObject queryObjectForDistances, AnswerType answerType)
locatorPrefix
- the locator prefix to search forqueryObjectForDistances
- the query object to use for computing distancesanswerType
- the type of objects this operation stores in its answerpublic GetObjectsByLocatorPrefixOperation(java.lang.String locatorPrefix, LocalAbstractObject queryObjectForDistances)
locatorPrefix
- the locator prefix to search forqueryObjectForDistances
- the query object to use for computing distancespublic GetObjectsByLocatorPrefixOperation(java.lang.String locatorPrefix)
locatorPrefix
- the locator prefix to search forpublic java.lang.Object getArgument(int index) throws java.lang.IndexOutOfBoundsException
AbstractOperation
getArgument
in class AbstractOperation
index
- zero-based index of an argument passed to constructorjava.lang.IndexOutOfBoundsException
- if index parameter is out of rangepublic int getArgumentCount()
AbstractOperation
getArgumentCount
in class AbstractOperation
public java.lang.String getLocatorPrefix()
public int evaluate(AbstractObjectIterator<? extends LocalAbstractObject> objects)
QueryOperation
evaluate
in class QueryOperation<RankedAbstractObject>
objects
- the collection of objects on which to evaluate this querypublic java.lang.Class<? extends RankedAbstractObject> getAnswerClass()
QueryOperation
getAnswerClass
in class RankingQueryOperation
protected boolean dataEqualsImpl(QueryOperation obj)
QueryOperation
dataEqualsImpl
in class QueryOperation<RankedAbstractObject>
obj
- the reference object with which to compare.true
if this object has the same data as the obj
argument; false
otherwise.public int dataHashCode()
QueryOperation
dataHashCode
in class QueryOperation<RankedAbstractObject>