ca.uhn.cache.impl
Class StringParam
java.lang.Object
ca.uhn.cache.impl.CommonsLangObject
ca.uhn.cache.impl.AbstractQueryParam
ca.uhn.cache.impl.StringParam
- All Implemented Interfaces:
- java.lang.Comparable, IPointQueryParam, IQueryParam, java.io.Serializable
- public class StringParam
- extends AbstractQueryParam
- implements IPointQueryParam
A IPointQueryParam
that selects data items with values along
a certain dimension exactly equal to a certain String
value.
- Version:
- $Revision: 1.1 $ updated on $Date: 2005/01/24 22:52:32 $ by $Author: bryan_tripp $
- Author:
- Bryan Tripp, Alexei Guevara
- See Also:
- Serialized Form
Constructor Summary |
StringParam(IDimension theDimension,
java.lang.String theValue)
Creates a new StringParam . |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
StringParam
public StringParam(IDimension theDimension,
java.lang.String theValue)
- Creates a new
StringParam
.
- Parameters:
theDimension
- The dimension where this parameter is difined.theValue
- The value of this parameter.
intersects
public boolean intersects(IQueryParam theParam)
-
- Specified by:
intersects
in interface IQueryParam
- Overrides:
intersects
in class AbstractQueryParam
getValue
public java.lang.String getValue()
- Returns:
- Returns the value.
getDistance
public float getDistance(IQueryParam theParam,
IQueryParam theSaturationPoint)
- Strings are treated as unordered uncategories rather than as with alphabetical
order.
- Specified by:
getDistance
in interface IQueryParam
- Parameters:
theParam
- must be a StringParam or StringSetParamtheSaturationPoint
- ignored
- Returns:
- 0 if the given param is the same, or is contained in a given StringSetParam,
0.5 if it is not (0.5 is similar to the mean distance between random values in
an ordered dimension)
- See Also:
IQueryParam.getDistance(ca.uhn.cache.IQueryParam, ca.uhn.cache.IQueryParam)
merge
public IQueryParam merge(IQueryParam theParam)
- Specified by:
merge
in interface IQueryParam
- Parameters:
theParam
- must be a StringParam or StringSetParam
- Returns:
- a StringSetParam containing this and the given value(s)
- See Also:
IQueryParam.merge(ca.uhn.cache.IQueryParam)
Copyright © 2004-2005 University Health Network. All Rights Reserved.