public class XSSFDataValidationConstraint extends java.lang.Object implements DataValidationConstraint
DataValidationConstraint.OperatorType, DataValidationConstraint.ValidationType
Constructor and Description |
---|
XSSFDataValidationConstraint(int validationType,
int operator,
java.lang.String formula1) |
XSSFDataValidationConstraint(int validationType,
int operator,
java.lang.String formula1,
java.lang.String formula2)
This is the constructor called using the OOXML raw data.
|
XSSFDataValidationConstraint(int validationType,
java.lang.String formula1) |
XSSFDataValidationConstraint(java.lang.String[] explicitListOfValues)
list literal constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getExplicitListValues()
If validation type is
DataValidationConstraint.ValidationType.LIST
and formula1 was comma-separated literal values rather than a range or named range,
returns list of literal values. |
java.lang.String |
getFormula1() |
java.lang.String |
getFormula2() |
int |
getOperator() |
int |
getValidationType() |
protected static boolean |
isFormulaEmpty(java.lang.String formula1) |
java.lang.String |
prettyPrint() |
protected static java.lang.String |
removeLeadingEquals(java.lang.String formula1) |
void |
setExplicitListValues(java.lang.String[] explicitListValues) |
void |
setFormula1(java.lang.String formula1)
Sets a formula for expression 1.
|
void |
setFormula2(java.lang.String formula2)
Sets a formula for expression 2.
|
void |
setOperator(int operator)
Sets the comparison operator for this constraint
|
void |
validate() |
public XSSFDataValidationConstraint(java.lang.String[] explicitListOfValues)
public XSSFDataValidationConstraint(int validationType, java.lang.String formula1)
public XSSFDataValidationConstraint(int validationType, int operator, java.lang.String formula1)
public XSSFDataValidationConstraint(int validationType, int operator, java.lang.String formula1, java.lang.String formula2)
validationType
- operator
- formula1
- Overloaded: formula1 or list of explicit valuesformula2
- (formula1 is a list of explicit values, this is ignored: use null
)public java.lang.String[] getExplicitListValues()
DataValidationConstraint
DataValidationConstraint.ValidationType.LIST
and formula1
was comma-separated literal values rather than a range or named range,
returns list of literal values.
Otherwise returns null
.getExplicitListValues
in interface DataValidationConstraint
public java.lang.String getFormula1()
getFormula1
in interface DataValidationConstraint
null
public java.lang.String getFormula2()
getFormula2
in interface DataValidationConstraint
null
public int getOperator()
getOperator
in interface DataValidationConstraint
DataValidationConstraint.OperatorType
public int getValidationType()
getValidationType
in interface DataValidationConstraint
DataValidationConstraint.ValidationType
public void setExplicitListValues(java.lang.String[] explicitListValues)
setExplicitListValues
in interface DataValidationConstraint
public void setFormula1(java.lang.String formula1)
DataValidationConstraint
setFormula1
in interface DataValidationConstraint
protected static java.lang.String removeLeadingEquals(java.lang.String formula1)
protected static boolean isFormulaEmpty(java.lang.String formula1)
public void setFormula2(java.lang.String formula2)
DataValidationConstraint
setFormula2
in interface DataValidationConstraint
public void setOperator(int operator)
DataValidationConstraint
setOperator
in interface DataValidationConstraint
DataValidationConstraint.OperatorType
public void validate()
public java.lang.String prettyPrint()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.