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)
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.
|
public FieldConstraints(Map<String,Integer> stringMapping, Map<Integer,Integer> intMapping, Set<SpecialChar> specialChars, int startRange, int endRange)
specialChars
- - allowed special chars.startRange
- - lowest possible valueendRange
- - highest possible valuepublic 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.Copyright © 2018. All rights reserved.