com.univocity.parsers.annotations
Annotation Type BooleanString


@Retention(value=RUNTIME)
@Inherited
@Target(value={FIELD,METHOD,ANNOTATION_TYPE})
public @interface BooleanString

Indicates that parsed values such as "y", "No" or "null" should be interpreted as boolean values. If a parsed value exists in trueStrings(), then the field will receive true. If a parsed value exists in falseStrings() then the field will receive false.

A BooleanConversion will be assigned to this field

Commonly used for java beans processed using BeanProcessor and/or BeanWriterProcessor

Author:
uniVocity Software Pty Ltd - parsers@univocity.com
See Also:
Conversion, Conversions, BeanProcessor, BeanWriterProcessor

Required Element Summary
 String[] falseStrings
          A set of Strings that represent the boolean value false (e.g.
 String[] trueStrings
          A set of Strings that represent the boolean value true (e.g.
 

Element Detail

trueStrings

public abstract String[] trueStrings
A set of Strings that represent the boolean value true (e.g. "y", "yes", "1")

Returns:
Strings that represent true

falseStrings

public abstract String[] falseStrings
A set of Strings that represent the boolean value false (e.g. "n", "no", "0")

Returns:
Strings that represent false


Copyright © 2017 uniVocity Software Pty Ltd. All rights reserved.