Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * DOCUMENT ME!
     * 
     * @param id
     *           DOCUMENT ME!
     * @param ids
     *           DOCUMENT ME!
     * @return DOCUMENT ME!
     */
    public static boolean isIn(String id, String[] ids) {
        if ((null == id) || (id.trim().equals("")) || (null == ids)) {
            return false;
        }

        boolean flag = false;

        for (int i = 0; i < ids.length; i++) {
            if (ids[i] != null && id.trim().equalsIgnoreCase(ids[i].trim())) {
                flag = true;

                break;
            }
        }

        return flag;
    }
}