public static <T>boolean contains(Enumeration<T> enumeration,T element){
  if (enumeration != null) {
    while (enumeration.hasMoreElements()) {
      T candidate=enumeration.nextElement();
      if (ObjectUtils.nullSafeEquals(candidate,element))       return true;
    }
  }
  return false;
}

public static < T > boolean contains ( Enumeration < T > enumeration , T element ) { if ( enumeration != null ) { while ( enumeration . hasMoreElements ( ) ) { T candidate = enumeration . nextElement ( ) ; if ( ObjectUtils . nullSafeEquals ( candidate , element ) ) return true ; } } return false ; }
check whether the given enumeration contains the given element .
