Package com.yahoo.search.query.profile
Class QueryProfileVariant
- java.lang.Object
-
- com.yahoo.search.query.profile.QueryProfileVariant
-
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Comparable<QueryProfileVariant>
public class QueryProfileVariant extends java.lang.Object implements java.lang.Cloneable, java.lang.Comparable<QueryProfileVariant>
A variant of a query profile- Author:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description QueryProfileVariant(DimensionValues dimensionValues, QueryProfile owner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(boolean allowContent, QueryProfileType type, com.yahoo.search.query.profile.QueryProfileVisitor visitor, DimensionBinding dimensionBinding)
Accepts a visitor to the values of thisQueryProfileVariant
clone()
int
compareTo(QueryProfileVariant other)
Implements the sort order of this which is based on specificity where dimensions to the left are more significant.void
freeze()
DimensionValues
getDimensionValues()
void
inherit(QueryProfile profile)
java.util.List<QueryProfile>
inherited()
Returns the live reference to the inherited profiles of this.java.lang.Boolean
isOverridable(java.lang.String key)
boolean
matches(DimensionValues givenDimensionValues)
java.lang.Object
set(java.lang.String key, java.lang.Object newValue)
void
setOverridable(java.lang.String key, boolean overridable)
java.lang.String
toString()
java.util.Map<java.lang.String,java.lang.Object>
values()
Returns the live reference to the values of this.
-
-
-
Constructor Detail
-
QueryProfileVariant
public QueryProfileVariant(DimensionValues dimensionValues, QueryProfile owner)
-
-
Method Detail
-
getDimensionValues
public DimensionValues getDimensionValues()
-
values
public java.util.Map<java.lang.String,java.lang.Object> values()
Returns the live reference to the values of this. This may be modified if this is not frozen.
-
inherited
public java.util.List<QueryProfile> inherited()
Returns the live reference to the inherited profiles of this. This may be modified if this is not frozen.
-
set
public java.lang.Object set(java.lang.String key, java.lang.Object newValue)
-
setOverridable
public void setOverridable(java.lang.String key, boolean overridable)
-
isOverridable
public java.lang.Boolean isOverridable(java.lang.String key)
-
inherit
public void inherit(QueryProfile profile)
-
compareTo
public int compareTo(QueryProfileVariant 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<QueryProfileVariant>
-
matches
public boolean matches(DimensionValues givenDimensionValues)
-
accept
public void accept(boolean allowContent, QueryProfileType type, com.yahoo.search.query.profile.QueryProfileVisitor visitor, DimensionBinding dimensionBinding)
Accepts a visitor to the values of this
-
freeze
public void freeze()
-
clone
public QueryProfileVariant clone()
- Overrides:
clone
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-