private static List < String > filterDelimeterElement ( List < String > arr , char [ ] delimeter ) { List < String > list = new ArrayList < String > ( ) ; for ( String s : arr ) { if ( s == null || s . isEmpty ( ) ) { continue ; } if ( s . length ( ) > 1 ) { list . add ( s ) ; continue ; } char strChar = s . charAt ( 0 ) ; boolean find = false ; for ( char c : delimeter ) { if ( c == strChar ) { find = true ; break ; } } if ( find == false ) { list . add ( s ) ; } } return list ; }
Filter the delimeter from the String array .