public abstract class BuilderSupport extends Object implements Serializable
Predicates.| Modifier | Constructor and Description |
|---|---|
protected |
BuilderSupport() |
protected BuilderSupport()
public Predicate isEqual(Object expected)
expected - expected valuetrue if the expected value equals the
actual valuepublic Predicate isEqualIgnoreCase(Object expected)
expected - expected valuetrue if the expected value
case-insensitively equals the actual valuepublic Predicate empty()
true if the actual value is null, has zero
length or is explicitly "empty" as HL7 defines it ("").public Predicate emptyOr(Predicate predicate)
predicate - the predicate to evaluate if not emptytrue if the actual value is empty or the
passed predicate evaluates to true.public Predicate matches(String regex)
regex - regular expressiontrue if the actual value matches the
regular expressionpublic Predicate matches(String regex, String description)
regex - regular expressiondescription - custom descriptiom for this regextrue if the actual value matches the
regular expressionpublic Predicate startsWith(String prefix)
prefix - prefix stringtrue if the actual value starts with the
specified prefix.public Predicate nonNegativeInteger()
true if the actual value can be parsed
into a non-negative integer.public Predicate number()
true if the actual value can be parsed
into a number with optional decimal digits.public Predicate date()
true if the actual value matches a HL7
date pattern (YYYY[MM[DD]])public Predicate time()
true if the actual value matches a HL7
time patternpublic Predicate dateTime()
true if the actual value matches a HL7
datetime patternpublic Predicate dateTime25()
true if the actual value matches a HL7
datetime patternpublic Predicate usPhoneNumber()
true if the actual value matches a US
phone number patternpublic Predicate oid()
true if the actual value matches an ISO
OID patternpublic Predicate uuid()
true if the actual value matches a UUID
patternpublic Predicate matches(String regex, int flags)
regex - regular expressionflags - regular expression flagstrue if the actual value matches the
regular expressionpublic Predicate in(Object... allowed)
allowed - allowed valuestrue if the actual value occurs in he
specified array of objectspublic Predicate in(Collection<?> allowed)
allowed - allowed valuestrue if the actual value occurs in he
specified collection of objectspublic Predicate anyOf(Iterable<Predicate> predicates)
predicates - predicates of which one shall evaluate to truetrue if any of the specified predicates
evaluates to truepublic Predicate allOf(Iterable<Predicate> predicates)
predicates - predicates of which all shall evaluate to truetrue if all of the specified predicates
evaluate to truepublic Predicate anyOf(Predicate... predicates)
predicates - predicates of which one shall evaluate to truetrue if any of the specified predicates
evaluates to truepublic Predicate allOf(Predicate... predicates)
predicates - predicates of which all shall evaluate to truetrue if all of the specified predicates
evaluate to truepublic Predicate not(Predicate predicate)
predicate - predicate to be negatedtrue if the specified predicate evaluate
to falsepublic Predicate maxLength(int maxSize)
maxSize - maximal length of the valuetrue if the length of the actual value is
equal or shorter than the specified lengthpublic Predicate withdrawn()
false giving the reason that the message
element has been withdrawn and should not be used anymore.public Predicate always(boolean b)
public Predicate alwaysFails()
falseCopyright © 2001–2017 University Health Network. All rights reserved.