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 PropertyTypeIntegercreate()Create an integer property type without constraints, whose default value is zero.static PropertyTypeIntegerCreate an integer property.static PropertyTypeIntegerCreate an integer property type without constraints.static PropertyTypeIntegercreateNegative(Integer def) Create a negative integer property type.static PropertyTypeIntegerCreate a negative or null integer property type.static PropertyTypeIntegercreatePositive(Integer def) Create a positive integer property type.static PropertyTypeIntegerCreate a positive or null integer property type.booleanGet the default value.intgetMax()Get the maximum allowed integer value.intgetMin()Get the minimum allowed integer value.getName()Get the type name.inthashCode()toString()booleanValidate a property value.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:IPropertyTypeIntegerGet the minimum allowed integer value.- Specified by:
getMinin interfaceIPropertyTypeInteger- Returns:
- the value
-
getMax
public int getMax()Description copied from interface:IPropertyTypeIntegerGet the maximum allowed integer value.- Specified by:
getMaxin interfaceIPropertyTypeInteger- Returns:
-
getName
Description copied from interface:IPropertyTypeGet the type name.- Specified by:
getNamein interfaceIPropertyType- Returns:
-
getDefault
Description copied from interface:IPropertyTypeGet the default value.- Specified by:
getDefaultin interfaceIPropertyType- Specified by:
getDefaultin interfaceIPropertyTypeInteger- Returns:
- the default value, cannot be null
-
validate
Description copied from interface:IPropertyTypeValidate a property value.- Specified by:
validatein interfaceIPropertyType- Parameters:
value- the property value- Returns:
- true on success
-
afterRead
Description copied from interface:IPropertyTypePost-processing to be done after reading a value. This method should only be called after a successful call toIPropertyType.validate(Object).- Specified by:
afterReadin interfaceIPropertyTypevalue- must not be null- Returns:
-
hashCode
public int hashCode() -
equals
-
toString
-