Java Boolean From toBooleanObject(String str)

Here you can find the source of toBooleanObject(String str)

Description

to Boolean Object

License

Apache License

Declaration

public static Boolean toBooleanObject(String str) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static Boolean toBooleanObject(String str) {
        return str != null ? Boolean.valueOf(str) : null;
    }// w  ww . ja  va 2  s.co m

    public static Boolean toBooleanObject(String str, Boolean defaultValue) {
        return str != null ? Boolean.valueOf(str) : defaultValue;
    }
}

Related

  1. toBooleanDefaultIfNull(Boolean bool, boolean valueIfNull)
  2. toBooleanObject(final int val)
  3. toBooleanObject(final String str)
  4. toBooleanObject(int value, int trueValue, int falseValue, int nullValue)
  5. toBooleanObject(int value, int trueValue, int falseValue, int nullValue)
  6. toBooleans(byte[] bytes)
  7. toBooleans(byte[] value, int offset, int num)
  8. toBooleanString(long value)
  9. toBooleanTrue(String str)