public boolean isCostCollectorType(String... types){
  String type=getCostCollectorType();
  for (  String t : types) {
    if (type.equals(t))     return true;
  }
  return false;
}

public boolean isCostCollectorType ( String ... types ) { String type = getCostCollectorType ( ) ; for ( String t : types ) { if ( type . equals ( t ) ) return true ; } return false ; }
check if costcollectortype is equal with any of provided types
