All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dragome.forms.bindings.client.util.Utils Maven / Gradle / Ivy

There is a newer version: 0.96-beta4
Show newest version
package com.dragome.forms.bindings.client.util;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: andrew
 * Date: Feb 24, 2010
 * Time: 5:13:12 PM
 * To change this template use File | Settings | File Templates.
 */
public class Utils
{
	public static  List asList(T first, T... others)
	{
		ArrayList list= new ArrayList();
		list.add(first);
		if (others.length > 0)
		{
			list.addAll(Arrays.asList(others));
		}
		return list;
	}

	public static  List asList(T first, T second, T... others)
	{
		ArrayList list= new ArrayList();
		list.add(first);
		list.add(second);
		if (others.length > 0)
		{
			list.addAll(Arrays.asList(others));
		}
		return list;
	}

	public static  boolean areEqual(T a, T b)
	{
		return a == null ? b == null : a.equals(b);
	}

	public static  boolean areDifferent(T a, T b)
	{
		return !areEqual(a, b);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy