ca.uhn.cache.impl
Class StringSetParam
java.lang.Object
ca.uhn.cache.impl.CommonsLangObject
ca.uhn.cache.impl.AbstractQueryParam
ca.uhn.cache.impl.StringSetParam
- All Implemented Interfaces:
- java.lang.Comparable, IGroupQueryParam, IQueryParam, java.io.Serializable
- public class StringSetParam
- extends AbstractQueryParam
- implements IGroupQueryParam
A IQueryParam
that selects data items with values along
a certain dimension exactly equal to one of a set of String values.
- Version:
- $Revision: 1.1 $ updated on $Date: 2005/01/24 22:52:32 $ by $Author: bryan_tripp $
- Author:
- Bryan Tripp
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
StringSetParam
public StringSetParam(IDimension theDimension,
java.util.Set theValues)
- Creates a new
StringSetParam
.
- Parameters:
theDimension
- The dimension where this parameter is difined.theValues
- The set of String values.
StringSetParam
public StringSetParam(IDimension theDimension,
java.lang.String[] theValues)
- Creates a new
StringSetParam
.
- Parameters:
theDimension
- The dimension where this parameter is difined.theValues
- The set of String values as a String[].
intersects
public boolean intersects(IQueryParam theParam)
-
- Specified by:
intersects
in interface IQueryParam
- Overrides:
intersects
in class AbstractQueryParam
getPointParamClass
public java.lang.Class getPointParamClass()
- Specified by:
getPointParamClass
in interface IGroupQueryParam
- Overrides:
getPointParamClass
in class AbstractQueryParam
- Returns:
- StringParam.class
intersects
protected static boolean intersects(StringSetParam theOne,
StringSetParam theOther)
- Parameters:
theOne
- a StringSetParamtheOther
- a StringSetParam
- Returns:
- true iff any value is shared by both, or they are both empty
getValues
protected static java.util.Set getValues(IQueryParam theParam)
- Parameters:
theParam
- a StringParam or StringSetParam
- Returns:
- its value(s)
getValues
public java.util.Set getValues()
- Returns:
- Returns the values.
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 intersects this one, or 0.5 if it doesn't
(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.