Here you can find the source of asBoolean(String flag)
public static Boolean asBoolean(String flag)
//package com.java2s; //License from project: Open Source License public class Main { public static final String YES_AS_STRING = "Y"; /**//www.j av a2s . c o m * Converts the given string into a Boolean flag of either true, false or * null. */ public static Boolean asBoolean(String flag) { return flag == null ? null : flag.equals(YES_AS_STRING); } }