Class PropertyTypeInteger
java.lang.Object
com.pnfsoftware.jeb.core.properties.impl.PropertyTypeInteger
- All Implemented Interfaces:
IPropertyType
,IPropertyTypeInteger
Integer property type with constraints.
-
Method Summary
Modifier and TypeMethodDescriptionafterRead
(IPropertyDefinition def, Object value) Post-processing to be done after reading a value.static PropertyTypeInteger
create()
Create an integer property type without constraints, whose default value is zero.static PropertyTypeInteger
Create an integer property.static PropertyTypeInteger
Create an integer property type without constraints.static PropertyTypeInteger
createNegative
(Integer def) Create a negative integer property type.static PropertyTypeInteger
Create a negative or null integer property type.static PropertyTypeInteger
createPositive
(Integer def) Create a positive integer property type.static PropertyTypeInteger
Create a positive or null integer property type.boolean
Get the default value.int
getMax()
Get the maximum allowed integer value.int
getMin()
Get the minimum allowed integer value.getName()
Get the type name.int
hashCode()
toString()
boolean
Validate a property value.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.pnfsoftware.jeb.core.properties.IPropertyType
beforeWrite
-
Method Details
-
create
Create an integer property.- Parameters:
min
- minimum value allowedmax
- maximum value alloweddef
- default value- Returns:
- the property type
-
create
Create an integer property type without constraints, whose default value is zero.- Returns:
- the property type
-
create
Create an integer property type without constraints.- Parameters:
def
- default value- Returns:
- the property type
-
createPositive
Create a positive integer property type.- Parameters:
def
- the default value- Returns:
- the property type
-
createPositiveOrZero
Create a positive or null integer property type.- Parameters:
def
- the default value- Returns:
- the property type
-
createNegative
Create a negative integer property type.- Parameters:
def
- the default value- Returns:
- the property type
-
createNegativeOrZero
Create a negative or null integer property type.- Parameters:
def
- the default value- Returns:
- the property type
-
getMin
public int getMin()Description copied from interface:IPropertyTypeInteger
Get the minimum allowed integer value.- Specified by:
getMin
in interfaceIPropertyTypeInteger
- Returns:
- the value
-
getMax
public int getMax()Description copied from interface:IPropertyTypeInteger
Get the maximum allowed integer value.- Specified by:
getMax
in interfaceIPropertyTypeInteger
- Returns:
-
getName
Description copied from interface:IPropertyType
Get the type name.- Specified by:
getName
in interfaceIPropertyType
- Returns:
-
getDefault
Description copied from interface:IPropertyType
Get the default value.- Specified by:
getDefault
in interfaceIPropertyType
- Specified by:
getDefault
in interfaceIPropertyTypeInteger
- Returns:
- the default value, cannot be null
-
validate
Description copied from interface:IPropertyType
Validate a property value.- Specified by:
validate
in interfaceIPropertyType
- Parameters:
value
- the property value- Returns:
- true on success
-
afterRead
Description copied from interface:IPropertyType
Post-processing to be done after reading a value. This method should only be called after a successful call toIPropertyType.validate(Object)
.- Specified by:
afterRead
in interfaceIPropertyType
value
- must not be null- Returns:
-
hashCode
public int hashCode() -
equals
-
toString
-