Package org.jpos.iso
Class IVA_NUM
- java.lang.Object
-
- org.jpos.iso.ISOFieldValidator
-
- org.jpos.iso.IVA_NUM
-
- All Implemented Interfaces:
Configurable
,ISOValidator
- Direct Known Subclasses:
IVA_NUMNOZERO
public class IVA_NUM extends ISOFieldValidator
Validator for ASCII numeric fields. By default radix is 10.Title: jPOS
Description: Java Framework for Financial Systems
Copyright: Copyright (c) 2000 jPOS.org. All rights reserved.
Company: www.jPOS.org
-
-
Field Summary
Fields Modifier and Type Field Description protected int
radix
by default is decimal-
Fields inherited from class org.jpos.iso.ISOFieldValidator
breakOnError, cfg, description, fieldId, maxLen, minLen
-
-
Constructor Summary
Constructors Constructor Description IVA_NUM()
IVA_NUM(boolean breakOnError, int minLen, int maxLen, java.lang.String Description)
IVA_NUM(boolean breakOnError, int minLen, int maxLen, java.lang.String Description, int radix)
IVA_NUM(boolean breakOnError, int maxLen, java.lang.String Description)
IVA_NUM(boolean breakOnError, int maxLen, java.lang.String Description, int radix)
IVA_NUM(boolean breakOnError, java.lang.String Description)
IVA_NUM(boolean breakOnError, java.lang.String Description, int radix)
IVA_NUM(int minLen, int maxLen, java.lang.String Description)
Create the validator.IVA_NUM(int minLen, int maxLen, java.lang.String Description, int radix)
Create the validatorIVA_NUM(int maxLen, java.lang.String Description)
IVA_NUM(int maxLen, java.lang.String Description, int radix)
IVA_NUM(java.lang.String Description)
radix = 10.IVA_NUM(java.lang.String Description, int radix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setConfiguration(Configuration cfg)
Configure the validator.ISOComponent
validate(ISOComponent f)
Validate numeric condition.-
Methods inherited from class org.jpos.iso.ISOFieldValidator
breakOnError, getDescription, getFieldId, getRejCode, setBreakOnError, setDescription, setFieldId, setMaxLength, setMinLength
-
-
-
-
Field Detail
-
radix
protected int radix
by default is decimal
-
-
Constructor Detail
-
IVA_NUM
public IVA_NUM()
-
IVA_NUM
public IVA_NUM(java.lang.String Description)
radix = 10.- Parameters:
Description
- Brief description.
-
IVA_NUM
public IVA_NUM(java.lang.String Description, int radix)
-
IVA_NUM
public IVA_NUM(int maxLen, java.lang.String Description)
-
IVA_NUM
public IVA_NUM(int maxLen, java.lang.String Description, int radix)
-
IVA_NUM
public IVA_NUM(int minLen, int maxLen, java.lang.String Description)
Create the validator. Radix is 10.- Parameters:
minLen
- min length.maxLen
- max lengthDescription
- Validator description
-
IVA_NUM
public IVA_NUM(int minLen, int maxLen, java.lang.String Description, int radix)
Create the validator- Parameters:
minLen
- min length.maxLen
- max lengthDescription
- Validator descriptionradix
- numeric radix for numeric validation
-
IVA_NUM
public IVA_NUM(boolean breakOnError, java.lang.String Description)
-
IVA_NUM
public IVA_NUM(boolean breakOnError, java.lang.String Description, int radix)
-
IVA_NUM
public IVA_NUM(boolean breakOnError, int maxLen, java.lang.String Description)
-
IVA_NUM
public IVA_NUM(boolean breakOnError, int maxLen, java.lang.String Description, int radix)
-
IVA_NUM
public IVA_NUM(boolean breakOnError, int minLen, int maxLen, java.lang.String Description)
-
IVA_NUM
public IVA_NUM(boolean breakOnError, int minLen, int maxLen, java.lang.String Description, int radix)
-
-
Method Detail
-
setConfiguration
public void setConfiguration(Configuration cfg) throws ConfigurationException
Configure the validator. @see ISOFieldValidator class. Take config param "radix" wich specify the numeric radix.- Specified by:
setConfiguration
in interfaceConfigurable
- Overrides:
setConfiguration
in classISOFieldValidator
- Parameters:
cfg
- configuration instance- Throws:
ConfigurationException
-
validate
public ISOComponent validate(ISOComponent f) throws ISOException
Validate numeric condition. @see ISOFieldValidator class.- Specified by:
validate
in interfaceISOValidator
- Overrides:
validate
in classISOFieldValidator
- Parameters:
f
- ISOField to validate- Returns:
- see validate method in ISOFieldValidator class.
- Throws:
ISOException
- if any validation error.
-
-