code: public final void setConstraint(Constraint constraint) {
          Assert.notNull(constraint);
          if (!constraint.equals(this.constraint)) {
              if (this.constraint instanceof Observable) {
                  ((Observable) constraint).deleteObserver(this);
              }
              this.constraint = constraint;
              if (constraint instanceof Observable) {
                  ((Observable) constraint).addObserver(this);
              }
              fireContentsChanged(this, -1, -1);
          }
      }
docs: Defines the constraint which is applied to the list model elements
  
  @param constraint
  the constraint to set
  
  @throws IllegalArgumentException
  if constraint is null