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 o1, java.lang.Object o2)
          Returns whether the first Object equals to the second Object or not.
 
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 o1,
                             java.lang.Object o2)
Returns whether the first Object equals to the second Object or not. This method will compare two 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:
o1 - first Object
o2 - second Object
Returns:
true if the first Object equals to the second Object, 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