Uses of Interface
net.sourceforge.pmd.properties.PropertyConstraint
-
Packages that use PropertyConstraint Package Description net.sourceforge.pmd.properties -
-
Uses of PropertyConstraint in net.sourceforge.pmd.properties
Methods in net.sourceforge.pmd.properties that return PropertyConstraint Modifier and Type Method Description static <N extends Comparable<N>>
PropertyConstraint<N>NumericConstraints. above(N minInclusive)Requires the number to be greater than a lower bound.static <N extends Comparable<N>>
PropertyConstraint<N>NumericConstraints. below(N maxInclusive)Requires the number to be lower than an upper bound.static <U> PropertyConstraint<U>PropertyConstraint. fromPredicate(Predicate<? super U> pred, String constraintDescription)Builds a new validator from a predicate, and description.static <U> PropertyConstraint<U>PropertyConstraint. fromPredicate(Predicate<? super U> pred, String constraintDescription, Map<String,String> xmlConstraint)Builds a new constraint from a predicate, a description and xml attributes to serialize the constraint.PropertyConstraint<?>ConstraintViolatedException. getConstraint()static <N extends Comparable<N>>
PropertyConstraint<N>NumericConstraints. inRange(N minInclusive, N maxInclusive)Requires the number to be inside a range.static <N extends Number>
PropertyConstraint<N>NumericConstraints. positive()Requires the number to be strictly positive.default PropertyConstraint<Iterable<? extends T>>PropertyConstraint. toCollectionConstraint()Returns a constraint that validates a collection of Ts by checking each component conforms to this validator.default PropertyConstraint<Optional<? extends T>>PropertyConstraint. toOptionalConstraint()Returns a constraint that validates anOptional<T>by checking that the value conforms to this constraint if it is non-empty.Methods in net.sourceforge.pmd.properties that return types with arguments of type PropertyConstraint Modifier and Type Method Description abstract List<PropertyConstraint<? super T>>PropertySerializer. getConstraints()Returns the constraints that this mapper applies to values after parsing them.Methods in net.sourceforge.pmd.properties with parameters of type PropertyConstraint Modifier and Type Method Description PropertyBuilder.GenericCollectionPropertyBuilder<V,C>PropertyBuilder.GenericCollectionPropertyBuilder. require(PropertyConstraint<? super C> constraint)abstract BPropertyBuilder. require(PropertyConstraint<? super T> constraint)Add a constraint on the values that this property may take.PropertyBuilder.GenericCollectionPropertyBuilder<V,C>PropertyBuilder.GenericCollectionPropertyBuilder. requireEach(PropertyConstraint<? super V> constraint)Require that the given constraint be fulfilled on each item of the value of this property.PropertySerializer<T>PropertySerializer. withConstraint(PropertyConstraint<? super T> t)Returns a new XML mapper that will check parsed values with the given constraint.
-