Package com.yahoo.search.query.profile
Class QueryProfileVariants.FieldValue
- java.lang.Object
-
- com.yahoo.search.query.profile.QueryProfileVariants.FieldValue
-
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Comparable<QueryProfileVariants.FieldValue>
- Enclosing class:
- QueryProfileVariants
public static class QueryProfileVariants.FieldValue extends java.lang.Object implements java.lang.Comparable<QueryProfileVariants.FieldValue>, java.lang.Cloneable
-
-
Constructor Summary
Constructors Constructor Description FieldValue(DimensionValues dimensionValues, java.lang.Object value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryProfileVariants.FieldValue
clone()
QueryProfileVariants.FieldValue
clone(java.lang.String fieldName, java.util.List<QueryProfileVariant> clonedVariants)
Clone by filling in the value from the given variantsint
compareTo(QueryProfileVariants.FieldValue other)
Implements the sort order of this which is based on specificity where dimensions to the left are more significant.DimensionValues
getDimensionValues()
Returns the dimension values for which this value should be used.java.lang.Object
getValue()
Returns the value to use for this set of dimension valuesboolean
matches(DimensionValues givenDimensionValues)
void
setValue(java.lang.Object value)
Sets the value to use for this set of dimension values
-
-
-
Constructor Detail
-
FieldValue
public FieldValue(DimensionValues dimensionValues, java.lang.Object value)
-
-
Method Detail
-
getDimensionValues
public DimensionValues getDimensionValues()
Returns the dimension values for which this value should be used. The dimension array is always of the exact size of the dimensions specified by the owning QueryProfileVariants, and the values appear in the order defined. "Wildcard" dimensions are represented by a null.
-
getValue
public java.lang.Object getValue()
Returns the value to use for this set of dimension values
-
setValue
public void setValue(java.lang.Object value)
Sets the value to use for this set of dimension values
-
matches
public boolean matches(DimensionValues givenDimensionValues)
-
compareTo
public int compareTo(QueryProfileVariants.FieldValue other)
Implements the sort order of this which is based on specificity where dimensions to the left are more significant.Note: This ordering is not consistent with equals - it returns 0 when the same dimensions are set, regardless of what they are set to.
- Specified by:
compareTo
in interfacejava.lang.Comparable<QueryProfileVariants.FieldValue>
-
clone
public QueryProfileVariants.FieldValue clone(java.lang.String fieldName, java.util.List<QueryProfileVariant> clonedVariants)
Clone by filling in the value from the given variants
-
clone
public QueryProfileVariants.FieldValue clone()
- Overrides:
clone
in classjava.lang.Object
-
-