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

## com.novell.nds.dirxml.driver.xds
Class ConstraintGroup

    java.lang.Object
      com.novell.nds.dirxml.driver.xds.Constraint
          com.novell.nds.dirxml.driver.xds.ConstraintGroup

public class ConstraintGroup
extends Constraint

A mechanism for grouping `Parameter` `Constraint`s with logical operators (`LogicalOp`s). The default logical operator is OR.

e.g. ( ['true', 't', 'yes', 'y'] or [1] )

Constructor Summary
`ConstraintGroup()` Instantiates an empty `ConstraintGroup`.

Method Summary
`void` | `add(Constraint constraint)` Adds a `Constraint` to this constraint group.
`boolean` | `canBeAppliedToMultipleParams()` Can this constraint be applied to multiple `Parameters`?
`boolean` | `equals(Object o)` Is the passed object equal to this constraint?
`boolean` | `forScalar()` Can this constrait be applied to a scalar `Parameter`?
`boolean` | `forStructured()` Can this constraint be applied to a structured `Parameter`?
`List` | `getTypes()` Returns the list of `DataType`s this constraint can be applied to.
`int` | `hashCode()` Returns this constraint's hashcode
`void` | `setNOT()` Negates this constraint.
`void` | `setOperator(LogicalOp someOp)` Changes this constraint groups `LogicalOp` to `someOp`.

Methods inherited from class com.novell.nds.dirxml.driver.xds.Constraint
`getNOT, getOperator, getType, toString`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ConstraintGroup

    public ConstraintGroup()

  Instantiates an empty `ConstraintGroup`.

Method Detail

### setNOT

    public void setNOT()

  Negates this constraint.

### forStructured

    public boolean forStructured()

  Description copied from class: `Constraint`
  Can this constraint be applied to a structured `Parameter`?

  A structured `Parameter` consists of multiple primitives or other structured `Parameter`s.

  Specified by:
    `forStructured` in class `Constraint`
  Returns:
    `true` if it can; `false` if it can't

### forScalar

    public boolean forScalar()

  Description copied from class: `Constraint`
  Can this constrait be applied to a scalar `Parameter`?

  A scalar `Parmeter` is a primitive (e.g., long, int, boolean) that has a single value.

  Specified by:
    `forScalar` in class `Constraint`
  Returns:
    `true` if it can; `false` if it can't

### setOperator

    public void setOperator(LogicalOp someOp)

  Changes this constraint groups `LogicalOp` to `someOp`.

  e.g. (['true', 't', 'yes', 'y'] or [1])
  e.g. (['true', 't', 'yes', 'y'] and [1])

  Parameters:
    `someOp` - is ignored when `null`

### add

    public void add(Constraint constraint)

  Adds a `Constraint` to this constraint group.

  Parameters:
    `constraint` - must not be `null`; a constraint may only be added once

### hashCode

    public int hashCode()

  Returns this constraint's hashcode

  Returns:
    the hashcode

### equals

    public boolean equals(Object o)

  Is the passed object equal to this constraint?

  Parameters:
    `o` - may be `null`
  Returns:
    `true` if they're equal; `false` if they're not

### canBeAppliedToMultipleParams

    public boolean canBeAppliedToMultipleParams()

  Description copied from class: `Constraint`
  Can this constraint be applied to multiple `Parameters`?

  Specified by:
    `canBeAppliedToMultipleParams` in class `Constraint`
  Returns:
    `true` if it can; `false` if it can't

### getTypes

    public List getTypes()

  Description copied from class: `Constraint`
  Returns the list of `DataType`s this constraint can be applied to.

  Overrides:
    `getTypes` in class `Constraint`
  Returns:
    a `List` of `DataType`s; will not return `null`

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