Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

import android.net.Uri;
import java.util.*;

public class Main {
    public static boolean getBooleanQueryParameter(Uri uri, String key, boolean defaultValue) {
        String flag = uri.getQueryParameter(key);
        if (flag == null) {
            return defaultValue;
        }
        flag = flag.toLowerCase(Locale.ROOT);
        return (!"false".equals(flag) && !"0".equals(flag));
    }
}