org.tridas.io.defaults.values
Class IntegerDefaultValue

java.lang.Object
  extended by org.tridas.io.defaults.AbstractDefaultValue<Integer>
      extended by org.tridas.io.defaults.values.IntegerDefaultValue
All Implemented Interfaces:
Cloneable

public class IntegerDefaultValue
extends AbstractDefaultValue<Integer>

Author:
Daniel

Constructor Summary
IntegerDefaultValue()
           
IntegerDefaultValue(Integer argInteger)
           
IntegerDefaultValue(Integer argInteger, int argMin, int argMax)
           
IntegerDefaultValue(Integer argInteger, int argMin, int argMax, int argMinLength, int argMaxLength)
          Constructor for a default field of type integer
IntegerDefaultValue(int argMin, int argMax)
           
 
Method Summary
 int getMax()
          Maximum the integer can be
 int getMin()
          Minimum the integer can be
 Integer getValue()
          Gets the value.
 boolean isFriendlyRangeValidation()
          if true, it will move the value into the range instead of disregarding the modification.
 void setFriendlyRangeValidation(boolean changeToRange)
          if true, it will move the value into the range instead of disregarding the modification.
 void setMax(int max)
          Maximum the integer can be
 void setMin(int min)
          Minimum the integer can be
protected  boolean validateAndSetValue(Integer argValue)
          Validate and set the value.
 
Methods inherited from class org.tridas.io.defaults.AbstractDefaultValue
clone, getKey, getMaxLength, getMinLength, getParent, getStringValue, isOverriding, isPadRight, setKey, setMaxLength, setMinLength, setOverriding, setOverridingValue, setPadRight, setParent, setValue
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerDefaultValue

public IntegerDefaultValue()

IntegerDefaultValue

public IntegerDefaultValue(Integer argInteger)

IntegerDefaultValue

public IntegerDefaultValue(Integer argInteger,
                           int argMin,
                           int argMax)

IntegerDefaultValue

public IntegerDefaultValue(int argMin,
                           int argMax)

IntegerDefaultValue

public IntegerDefaultValue(Integer argInteger,
                           int argMin,
                           int argMax,
                           int argMinLength,
                           int argMaxLength)
Constructor for a default field of type integer

Parameters:
argInteger -
argMin -
argMax -
argMinLength -
argMaxLength -
Method Detail

getValue

public Integer getValue()
Description copied from class: AbstractDefaultValue
Gets the value.

Specified by:
getValue in class AbstractDefaultValue<Integer>
Returns:
the value. can be null
See Also:
org.tridas.io.defaults.IDefaultValue#getValue()

validateAndSetValue

protected boolean validateAndSetValue(Integer argValue)
Description copied from class: AbstractDefaultValue
Validate and set the value.

Specified by:
validateAndSetValue in class AbstractDefaultValue<Integer>
Parameters:
argValue - the value, can be null.
Returns:
true if valid and set, false if not set and invalid
See Also:
org.tridas.io.defaults.IDefaultValue#setValue(java.lang.Object)

setMax

public void setMax(int max)
Maximum the integer can be

Parameters:
max - the max to set

getMax

public int getMax()
Maximum the integer can be

Returns:
the max

setMin

public void setMin(int min)
Minimum the integer can be

Parameters:
min - the min to set

getMin

public int getMin()
Minimum the integer can be

Returns:
the min

setFriendlyRangeValidation

public void setFriendlyRangeValidation(boolean changeToRange)
if true, it will move the value into the range instead of disregarding the modification. default of false

Parameters:
changeToRange - the changeToRange to set

isFriendlyRangeValidation

public boolean isFriendlyRangeValidation()
if true, it will move the value into the range instead of disregarding the modification. default of false

Returns:
the changeToRange


Copyright © 2011. All Rights Reserved.