com.alee.utils
Class CompareUtils

java.lang.Object
  extended by com.alee.utils.CompareUtils

public final class CompareUtils
extends java.lang.Object

This class provides a set of utilities to compare various objects.

Author:
Mikle Garin

Constructor Summary
CompareUtils()
           
 
Method Summary
static boolean contains(java.lang.String text, java.util.List<java.lang.String> tokens)
          Returns whether text contains any of the tokens from the specified list or not.
static boolean equals(java.lang.Object object, java.lang.Object... compareWith)
          Returns whether the first Object equals to any Object from the specified array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompareUtils

public CompareUtils()
Method Detail

equals

public static boolean equals(java.lang.Object object,
                             java.lang.Object... compareWith)
Returns whether the first Object equals to any Object from the specified array. This method will compare objects even if they are null without throwing any exceptions. This method should not be called from any method that overrides object default "equals" method.

Parameters:
object - object to compare
compareWith - objects to compare with
Returns:
true if the first Object equals to any Object from the specified array, false otherwise

contains

public static boolean contains(java.lang.String text,
                               java.util.List<java.lang.String> tokens)
Returns whether text contains any of the tokens from the specified list or not.

Parameters:
text - text to look for tokens
tokens - tokens list
Returns:
true if text contains any of the tokens from the specified list, false otherwise