public class FieldConstraints extends Object implements Serializable
Constructor and Description |
---|
FieldConstraints(Map<String,Integer> stringMapping,
Map<Integer,Integer> intMapping,
Set<SpecialChar> specialChars,
int startRange,
int endRange,
boolean strictRange)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getEndRange() |
Integer |
getIntMappingValue(Integer exp) |
Set<SpecialChar> |
getSpecialChars() |
int |
getStartRange() |
Set<String> |
getStringMappingKeySet() |
Integer |
getStringMappingValue(String exp) |
boolean |
isInRange(int value)
Check if given number is greater or equal to start range and minor or equal to end range.
|
boolean |
isPeriodInRange(int period)
Check if given period is compatible with the given range.
|
boolean |
isStrictRange() |
public FieldConstraints(Map<String,Integer> stringMapping, Map<Integer,Integer> intMapping, Set<SpecialChar> specialChars, int startRange, int endRange, boolean strictRange)
specialChars
- - allowed special chars.startRange
- - lowest possible valueendRange
- - highest possible valuestrictRange
- - if we shall consider strict ranges for this field - regardless global strict ranges criteriapublic int getStartRange()
public int getEndRange()
public Set<SpecialChar> getSpecialChars()
public boolean isInRange(int value)
value
- - to be checkedpublic boolean isPeriodInRange(int period)
period
- - to be checkedtrue
if period is compatible, false
otherwise.public boolean isStrictRange()
Copyright © 2020 JBoss by Red Hat. All rights reserved.