Package com.yahoo.prelude.query
Class PureWeightedInteger
- java.lang.Object
-
- com.yahoo.prelude.query.Item
-
- com.yahoo.prelude.query.PureWeightedItem
-
- com.yahoo.prelude.query.PureWeightedInteger
-
- All Implemented Interfaces:
Cloneable
public class PureWeightedInteger extends PureWeightedItem
An integer item which only consists of a value and weight.- Author:
- baldersheim
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.prelude.query.Item
Item.ItemCreator, Item.ItemType
-
-
Field Summary
-
Fields inherited from class com.yahoo.prelude.query.Item
connectedBacklink, connectedItem, connectivity, DEFAULT_WEIGHT, explicitSignificance, significance, uniqueID
-
-
Constructor Summary
Constructors Constructor Description PureWeightedInteger(long value)
PureWeightedInteger(long value, int weight)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendBodyString(StringBuilder buffer)
Override to append the item body in the canonical query language of this item.void
disclose(Discloser discloser)
protected void
encodeThis(ByteBuffer buffer)
boolean
equals(Object other)
Returns whether this item is of the same class and contains the same state as the given item.Item.ItemType
getItemType()
Return the enumerated type of this item.int
getTermCount()
long
getValue()
int
hashCode()
-
Methods inherited from class com.yahoo.prelude.query.PureWeightedItem
encode, getName, setIndexName
-
Methods inherited from class com.yahoo.prelude.query.Item
addAnnotation, appendHeadingString, clone, getAnnotation, getBytes, getCode, getCreator, getLabel, getLanguage, getParent, getWeight, hasAnnotation, hasConnectivityBackLink, hasUniqueID, isFilter, isFromSpecialToken, isProtected, isRanked, isRoot, putBytes, putString, setCreator, setFilter, setFromSpecialToken, setHasUniqueID, setLabel, setLanguage, setParent, setPositionData, setProtected, setRanked, setWeight, shouldParenthize, toString, usePositionData
-
-
-
-
Method Detail
-
getItemType
public Item.ItemType getItemType()
Description copied from class:Item
Return the enumerated type of this item.- Specified by:
getItemType
in classItem
-
encodeThis
protected void encodeThis(ByteBuffer buffer)
- Overrides:
encodeThis
in classItem
-
getTermCount
public int getTermCount()
- Specified by:
getTermCount
in classItem
-
appendBodyString
protected void appendBodyString(StringBuilder buffer)
Description copied from class:Item
Override to append the item body in the canonical query language of this item. An item is usually represented by the string([itemName] [body])
The body must be appended appended by this method.- Overrides:
appendBodyString
in classPureWeightedItem
-
getValue
public long getValue()
-
equals
public boolean equals(Object other)
Description copied from class:Item
Returns whether this item is of the same class and contains the same state as the given item.
-
disclose
public void disclose(Discloser discloser)
- Overrides:
disclose
in classPureWeightedItem
-
-