Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.schema.types.constraints
Class StringLengthConstraint

java.lang.Object
  extended by org.nuxeo.ecm.core.schema.types.constraints.StringLengthConstraint
All Implemented Interfaces:
Serializable, Constraint

public class StringLengthConstraint
extends Object
implements Constraint

String length constraint.

The length constraint is not strict (i.e. >= and <=).

Author:
Bogdan Stefanescu
See Also:
Serialized Form

Constructor Summary
StringLengthConstraint(int min, int max)
           
 
Method Summary
 int getMax()
           
 int getMin()
           
 boolean validate(Object object)
          Validates the given object against this constraint.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringLengthConstraint

public StringLengthConstraint(int min,
                              int max)
Method Detail

validate

public boolean validate(Object object)
Description copied from interface: Constraint
Validates the given object against this constraint.

Specified by:
validate in interface Constraint
Parameters:
object - the object to validate
Returns:
true if the object was successfully validated, false otherwise

getMin

public int getMin()

getMax

public int getMax()

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.