Example usage for java.lang Boolean valueOf

List of usage examples for java.lang Boolean valueOf

Introduction

In this page you can find the example usage for java.lang Boolean valueOf.

Prototype

public static Boolean valueOf(String s) 

Source Link

Document

Returns a Boolean with a value represented by the specified string.

Usage

From source file:com.xdtech.core.config.PropertiesConfigurer.java

public static boolean sysIsInitDataToDb() {
    String isInitData = props.getProperty("system.isInitDataToDb");
    return isInitData != null ? Boolean.valueOf(isInitData) : false;
}

From source file:org.anon.exec.MySqlExecTestBase.java

@Override
protected boolean assumeDbAvailable() {
    return Boolean.valueOf(available);

}

From source file:moefou4j.internal.util.Moefou4JInternalParseUtil.java

public static boolean getBoolean(final String name, final JSONObject json) {
    final String str = getRawString(name, json);
    if (null == str || "null".equals(str))
        return false;
    return Boolean.valueOf(str);
}

From source file:me.StevenLawson.BukkitTelnetClient.BTC_PlayerListDecoder.java

public static final boolean checkForPlayerListMessage(final String message, final List<PlayerInfo> playerList) {
    final Matcher matcher = PLAYER_LIST_MESSAGE.matcher(message);
    if (matcher.find()) {
        final String data = matcher.group(1);
        try {//w w w .  j a  v a 2  s  .c o m
            playerList.clear();

            final JSONObject json = new JSONObject(data);
            final JSONArrayIterable players = new JSONArrayIterable(json.getJSONArray("players"));
            for (JSONObject player : players) {
                final String name = getStringSafe(player, "name");
                playerList.add(new PlayerInfo(name, getStringSafe(player, "ip"),
                        getStringSafe(player, "displayName"), getStringSafe(player, "uuid"),
                        Boolean.valueOf(getStringSafe(player, "tfm.admin.isAdmin")),
                        Boolean.valueOf(getStringSafe(player, "tfm.admin.isTelnetAdmin")),
                        Boolean.valueOf(getStringSafe(player, "tfm.admin.isSeniorAdmin")),
                        getStringSafe(player, "tfm.playerdata.getTag"),
                        getStringSafe(player, "tfm.essentialsBridge.getNickname")));
            }

            Collections.sort(playerList, PlayerInfo.getComparator());

            return true;
        } catch (JSONException ex) {
        }
    }

    return false;
}

From source file:com.consol.citrus.samples.todolist.jms.JmsEnabledCondition.java

@Override
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
    return Boolean.valueOf(System.getProperty("todo.jms.enabled", "false"));
}

From source file:com.consol.citrus.samples.todolist.soap.WebServiceEnabledCondition.java

@Override
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
    return Boolean.valueOf(System.getProperty("todo.ws.enabled", "false"));
}

From source file:com.threewks.thundr.transformer.discrete.StringToBoolean.java

@Override
public Boolean from(String from) {
    from = StringUtils.trim(from);
    return from == null ? null : Boolean.valueOf(from);
}

From source file:uk.ac.ebi.intact.editor.config.property.BooleanPropertyConverter.java

@Override
public Boolean convertFromString(String str) {
    if (str == null)
        return null;

    return Boolean.valueOf(str);
}

From source file:com.glaf.shiro.SecurityConfig.java

public static boolean getBoolean(String key) {
    if (hasObject(key)) {
        String value = filterChainDefinitionMap.get(key);
        return Boolean.valueOf(value).booleanValue();
    }//from  w w  w.j a va2  s.co  m
    return false;
}

From source file:architecture.common.lifecycle.internal.AbstractApplicationProperties.java

public boolean getBooleanProperty(String propertyKey) {
    return Boolean.valueOf(get(propertyKey)).booleanValue();
}