// Decompiled by Jad v1.5.7. Copyright 1997-99 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   GeneralUtils.java

package com.symantec.itools.util;

import java.text.MessageFormat;
import java.util.ResourceBundle;

public final class GeneralUtils
{

    public GeneralUtils()
    {
    }

    public static boolean objectsEqual(Object obj, Object obj1)
    {
        if(obj == null)
            return obj1 == null;
        else
            return obj.equals(obj1);
    }

    public static void checkValidPercent(double d)
        throws IllegalArgumentException
    {
        if(d > 1.0D || d < 0.0D)
        {
            Object aobj[] = {
                new Double(d)
            };
            throw new IllegalArgumentException(MessageFormat.format(errors.getString("InvalidPercent2"), aobj));
        }
        else
        {
            return;
        }
    }

    public static String removeCharAtIndex(String s, int i)
    {
        if(s == null || s == "")
            return s;
        int j = s.length();
        if(i > j || i < 0)
        {
            return s;
        }
        else
        {
            String s1 = i <= 0 ? "" : s.substring(0, i);
            String s2 = i + 1 >= j ? "" : s.substring(i + 1);
            return s1 + s2;
        }
    }

    public static String frameTarget_self = "_self";
    public static String frameTarget_parent = "_parent";
    public static String frameTarget_top = "_top";
    public static String frameTarget_blank = "_blank";
    protected static ResourceBundle errors = ResourceBundle.getBundle("symantec.itools.resources.ErrorsBundle");

}
