aQute.bnd.build.model.conversions
Class DefaultBooleanFormatter

java.lang.Object
  extended by aQute.bnd.build.model.conversions.DefaultBooleanFormatter
All Implemented Interfaces:
Converter<String,Boolean>

public class DefaultBooleanFormatter
extends Object
implements Converter<String,Boolean>

Formatter for booleans with a default value; if the input value matches the default then it is formatted to null.

Author:
Neil Bartlett

Constructor Summary
DefaultBooleanFormatter(boolean defaultValue)
           
 
Method Summary
 String convert(Boolean input)
           
 String error(String msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBooleanFormatter

public DefaultBooleanFormatter(boolean defaultValue)
Method Detail

convert

public String convert(Boolean input)
               throws IllegalArgumentException
Specified by:
convert in interface Converter<String,Boolean>
Throws:
IllegalArgumentException

error

public String error(String msg)
Specified by:
error in interface Converter<String,Boolean>


Copyright © 2014 aQute SARL. All rights reserved.