Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.xssf.usermodel
Class XSSFDataValidationConstraint

    java.lang.Object
      org.apache.poi.xssf.usermodel.XSSFDataValidationConstraint

All Implemented Interfaces:
  DataValidationConstraint

    public class XSSFDataValidationConstraint

extends java.lang.Object
implements DataValidationConstraint

Author:
  Radhakrishnan J

Nested Class Summary

Nested classes/interfaces inherited from interface org.apache.poi.ss.usermodel.DataValidationConstraint
`DataValidationConstraint.OperatorType, DataValidationConstraint.ValidationType`

Constructor Summary
`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

Method Summary
`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()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XSSFDataValidationConstraint

    public XSSFDataValidationConstraint(java.lang.String[] explicitListOfValues)

  list literal constructor

### XSSFDataValidationConstraint

    public XSSFDataValidationConstraint(int validationType,
                                        java.lang.String formula1)

### XSSFDataValidationConstraint

    public XSSFDataValidationConstraint(int validationType,
                                        int operator,
                                        java.lang.String formula1)

### XSSFDataValidationConstraint

    public XSSFDataValidationConstraint(int validationType,
                                        int operator,
                                        java.lang.String formula1,
                                        java.lang.String formula2)

  This is the constructor called using the OOXML raw data. Excel overloads formula1 to also encode explicit value lists, so this constructor has to check for and parse that syntax.

  Parameters:
    `validationType` -
    `operator` -
    `formula1` - Overloaded: formula1 or list of explicit values
    `formula2` - (formula1 is a list of explicit values, this is ignored: use `null`)

Method Detail

### getExplicitListValues

    public java.lang.String[] getExplicitListValues()

  Description copied from interface: `DataValidationConstraint`
  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. Otherwise returns `null`.

  Specified by:
    `getExplicitListValues` in interface `DataValidationConstraint`

### getFormula1

    public java.lang.String getFormula1()

  Specified by:
    `getFormula1` in interface `DataValidationConstraint`
  Returns:
    the formula for expression 1. May be `null`

### getFormula2

    public java.lang.String getFormula2()

  Specified by:
    `getFormula2` in interface `DataValidationConstraint`
  Returns:
    the formula for expression 2. May be `null`

### getOperator

    public int getOperator()

  Specified by:
    `getOperator` in interface `DataValidationConstraint`
  Returns:
    the operator used for this constraint
  See Also:
    `DataValidationConstraint.OperatorType`

### getValidationType

    public int getValidationType()

  Specified by:
    `getValidationType` in interface `DataValidationConstraint`
  Returns:
    data validation type of this constraint
  See Also:
    `DataValidationConstraint.ValidationType`

### setExplicitListValues

    public void setExplicitListValues(java.lang.String[] explicitListValues)

  Specified by:
    `setExplicitListValues` in interface `DataValidationConstraint`

### setFormula1

    public void setFormula1(java.lang.String formula1)

  Description copied from interface: `DataValidationConstraint`
  Sets a formula for expression 1.

  Specified by:
    `setFormula1` in interface `DataValidationConstraint`

### removeLeadingEquals

    protected static java.lang.String removeLeadingEquals(java.lang.String formula1)

### isFormulaEmpty

    protected static boolean isFormulaEmpty(java.lang.String formula1)

### setFormula2

    public void setFormula2(java.lang.String formula2)

  Description copied from interface: `DataValidationConstraint`
  Sets a formula for expression 2.

  Specified by:
    `setFormula2` in interface `DataValidationConstraint`

### setOperator

    public void setOperator(int operator)

  Description copied from interface: `DataValidationConstraint`
  Sets the comparison operator for this constraint

  Specified by:
    `setOperator` in interface `DataValidationConstraint`
  See Also:
    `DataValidationConstraint.OperatorType`

### validate

    public void validate()

### prettyPrint

    public java.lang.String prettyPrint()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2017 The Apache Software Foundation or its licensors, as applicable.