Java Properties Get getBoolean(Properties props, String name, boolean defaultValue)

Here you can find the source of getBoolean(Properties props, String name, boolean defaultValue)

Description

get Boolean

License

Open Source License

Declaration

public static boolean getBoolean(Properties props, String name, boolean defaultValue) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    public static boolean getBoolean(Properties props, String name, boolean defaultValue) {
        if (!props.containsKey(name))
            return defaultValue;
        return "true".equalsIgnoreCase(props.getProperty(name));
    }/*from   ww  w.  java  2s  . c  o  m*/
}

Related

  1. clearPrefixedSystemProperties(String prefix, Map targetPropertyMap)
  2. copyProperties(Hashtable src, Hashtable target)
  3. getBoolean(Properties props, String key)
  4. getInt(Properties props, String name)
  5. getInt(Properties props, String name, int defaultValue)
  6. getIntersectionOfPropertyValues(Properties propertyFileOne, Properties propertyFileTwo)
  7. getIntInRange(Properties props, String name, int defaultValue, int min, int max)