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