public boolean appliesTo(String line,String route){
  if (!lines.isEmpty() && !lines.contains(line))   return false;
  if (!routes.isEmpty() && !routes.contains(route))   return false;
  return true;
}

public boolean appliesTo ( String line , String route ) { if ( ! lines . isEmpty ( ) && ! lines . contains ( line ) ) return false ; if ( ! routes . isEmpty ( ) && ! routes . contains ( route ) ) return false ; return true ; }
determines whether this pricing policy applies to a certain type of vehicle
