public static boolean contains ( final Label label , final String labelString ) { final String withoutWhite = StringProcessor . removeWhiteSpaces ( labelString ) ; for ( final Label . MapFieldEntry entry : label . getEntryList ( ) ) { for ( final String value : entry . getValueList ( ) ) { if ( StringProcessor . removeWhiteSpaces ( value ) . equalsIgnoreCase ( withoutWhite ) ) { return true ; } } } return false ; }
Test if a label contains a label string . This test iterates over all languages and all label strings for the language and check if one equals the label string . The test is done ignoring the case of the label string and ignoring white spaces .