Class ValueWithSource
- java.lang.Object
-
- com.yahoo.search.query.profile.compiled.ValueWithSource
-
public class ValueWithSource extends Object
A value in a query profile with information about its source.- Author:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description ValueWithSource(Object value, String source, boolean isUnoverridable, boolean isQueryProfile, QueryProfileType type, DimensionValues variant)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
boolean
isQueryProfile()
Returns true if this key references a query profile (i.e a non-leaf).boolean
isUnoverridable()
Returns true if this value cannot be overridden in queriesQueryProfileType
queryProfileType()
Returns tye type of this if it refers to a query profile (not a leaf value), and it has a typeString
source()
Returns the source of the query profile having a valueString
toString()
Object
value()
Returns the value at this key, or null if none (in which case this is references a query profile which has no value set).Optional<DimensionValues>
variant()
Returns the variant having this value, or empty if it's not in a variantValueWithSource
withSource(String source)
ValueWithSource
withValue(Object value)
ValueWithSource
withVariant(Optional<DimensionValues> variant)
-
-
-
Constructor Detail
-
ValueWithSource
public ValueWithSource(Object value, String source, boolean isUnoverridable, boolean isQueryProfile, QueryProfileType type, DimensionValues variant)
-
-
Method Detail
-
value
public Object value()
Returns the value at this key, or null if none (in which case this is references a query profile which has no value set).
-
source
public String source()
Returns the source of the query profile having a value
-
isUnoverridable
public boolean isUnoverridable()
Returns true if this value cannot be overridden in queries
-
isQueryProfile
public boolean isQueryProfile()
Returns true if this key references a query profile (i.e a non-leaf). In this case the value may or may not be null, as non-leafs may have values.
-
queryProfileType
public QueryProfileType queryProfileType()
Returns tye type of this if it refers to a query profile (not a leaf value), and it has a type
-
withValue
public ValueWithSource withValue(Object value)
-
withSource
public ValueWithSource withSource(String source)
-
withVariant
public ValueWithSource withVariant(Optional<DimensionValues> variant)
-
variant
public Optional<DimensionValues> variant()
Returns the variant having this value, or empty if it's not in a variant
-
-