net.sf.jmatchparser.util.csv.fieldreader
Class FieldDefinition<T>

java.lang.Object
  extended by net.sf.jmatchparser.util.csv.fieldreader.FieldDefinition<T>
Type Parameters:
T - Type of the parsed object
Direct Known Subclasses:
SimpleFieldDefinition

public class FieldDefinition<T>
extends Object

A definition of a field of the FieldReader, as seen from the perspective of the "consumer" that uses the parsed data.


Nested Class Summary
static class FieldDefinition.MandatoryState
          Mandatory state of a field.
 
Constructor Summary
FieldDefinition(Pattern mask, int maxLength, FieldDefinition.MandatoryState mandatory, ParseFormat<T> format)
          Create a new field definition.
FieldDefinition(String mask, int maxLength, FieldDefinition.MandatoryState mandatory, ParseFormat<T> format)
          Create a new field definition.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldDefinition

public FieldDefinition(Pattern mask,
                       int maxLength,
                       FieldDefinition.MandatoryState mandatory,
                       ParseFormat<T> format)
Create a new field definition.

Parameters:
mask - Regular expression the values have to match before being formatted.
maxLength - Maximum length of the values before being formatted
mandatory - mandatory state of this field (see FieldDefinition.MandatoryState)
format - Format to be applied to the value

FieldDefinition

public FieldDefinition(String mask,
                       int maxLength,
                       FieldDefinition.MandatoryState mandatory,
                       ParseFormat<T> format)
Create a new field definition.

Parameters:
mask - Regular expression the values have to match before being formatted.
maxLength - Maximum length of the values before being formatted
mandatory - mandatory state of this field (see FieldDefinition.MandatoryState)
format - Format to be applied to the value


Copyright © 2011. All Rights Reserved.