1 8 9 package com.sleepycat.je.config; 10 11 14 public class BooleanConfigParam extends ConfigParam { 15 16 private static final String DEBUG_NAME = 17 BooleanConfigParam.class.getName(); 18 19 25 BooleanConfigParam(String configName, 26 boolean defaultValue, 27 boolean mutable, 28 boolean forReplication, 29 String description) { 30 super(configName, 32 Boolean.valueOf(defaultValue).toString(), 33 mutable, 34 forReplication, 35 description); 36 } 37 38 41 public void validateValue(String value) 42 throws IllegalArgumentException { 43 44 if (!value.trim().equalsIgnoreCase(Boolean.FALSE.toString()) && 45 !value.trim().equalsIgnoreCase(Boolean.TRUE.toString())) { 46 throw new IllegalArgumentException 47 (DEBUG_NAME + ": " + value + " not valid boolean " + name); 48 } 49 } 50 } 51 | Popular Tags |