public class SearchCondition extends Object implements Serializable
Constructor and Description |
---|
SearchCondition(FieldDesc fieldDesc,
Comparable val)
Create a new SearchCondition where x == val
for the given column or parameter description.
|
SearchCondition(FieldDesc fieldDesc,
Comparable minVal,
boolean minInclusive,
Comparable maxVal,
boolean maxInclusive)
Create a new SearchCondition for the given column or parameter description,
where the "inclusive" parameters specify whether
the min and/or max values are included in the range.
|
SearchCondition(FieldDesc fieldDesc,
Comparable minVal,
Comparable maxVal)
Create a new SearchCondition where minVal <= x <= maxVal
for the given column or parameter description.
|
SearchCondition(FieldDesc fieldDesc,
double val)
Create a new numerical SearchCondition where (x == val)
for the given column or parameter description.
|
SearchCondition(FieldDesc fieldDesc,
double minVal,
double maxVal)
Create a new numerical SearchCondition where (minVal <= x <= maxVal)
for the given column or parameter description.
|
SearchCondition(FieldDesc fieldDesc,
String val)
Create a new String SearchCondition where (x == val)
for the given column or parameter description.
|
SearchCondition(FieldDesc fieldDesc,
String minVal,
String maxVal)
Create a new String SearchCondition where (minVal <= x <= maxVal)
for the given column or parameter description.
|
Modifier and Type | Method and Description |
---|---|
FieldDesc |
getFieldDesc()
Return the column or parameter description.
|
String |
getId()
Return the column or parameter id.
|
Comparable |
getMaxVal()
Return the maximum value (actually a Double or String)
|
Comparable |
getMinVal()
Return the minimum value (actually a Double or String)
|
String |
getName()
Return the column or parameter name.
|
Comparable |
getVal()
Return the value (actually a Double or String)
|
boolean |
isMaxInclusive()
Return True if the condition includes the max value.
|
boolean |
isMinInclusive()
Return True if the condition includes the min value.
|
boolean |
isRange()
Return true if this object represents a range.
|
boolean |
isTrueFor(Comparable val)
Return true if the condition is true for the given value.
|
boolean |
isTrueFor(double val)
Return true if the condition is true for the given numeric value.
|
static void |
main(String[] args)
Test cases
|
String |
toString()
Return a string representation of this class in the form "name=minVal[,maxVal]"
|
public SearchCondition(FieldDesc fieldDesc, Comparable minVal, Comparable maxVal)
public SearchCondition(FieldDesc fieldDesc, Comparable minVal, boolean minInclusive, Comparable maxVal, boolean maxInclusive)
public SearchCondition(FieldDesc fieldDesc, Comparable val)
public SearchCondition(FieldDesc fieldDesc, double minVal, double maxVal)
public SearchCondition(FieldDesc fieldDesc, double val)
public SearchCondition(FieldDesc fieldDesc, String minVal, String maxVal)
public Comparable getVal()
public Comparable getMinVal()
public Comparable getMaxVal()
public boolean isMinInclusive()
public boolean isMaxInclusive()
public boolean isTrueFor(Comparable val)
val
- The value to be checked against the condition.public boolean isTrueFor(double val)
val
- The value to be checked against the condition.public FieldDesc getFieldDesc()
public String getName()
public String getId()
public boolean isRange()
public String toString()
public static void main(String[] args)
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.