Uses of Interface
net.sourceforge.pmd.properties.PropertyConstraint
Packages that use PropertyConstraint
-
Uses of PropertyConstraint in net.sourceforge.pmd.properties
Methods in net.sourceforge.pmd.properties that return PropertyConstraintModifier and TypeMethodDescriptionstatic <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.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 PropertyConstraintModifier and TypeMethodDescriptionabstract 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 PropertyConstraintModifier and TypeMethodDescriptionPropertyBuilder.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.requireEach(PropertyConstraint<? super V> constraint) Require that the given constraint be fulfilled on each item of the value of this property.PropertySerializer.withConstraint(PropertyConstraint<? super T> t) Returns a new XML mapper that will check parsed values with the given constraint.