Skip to content

Instantly share code, notes, and snippets.

@sanaulla123
Created January 12, 2013 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sanaulla123/4515951 to your computer and use it in GitHub Desktop.
Save sanaulla123/4515951 to your computer and use it in GitHub Desktop.
public class CsvParser extends Parser {
public CsvParser(Parser successor){
this.setSuccessor(successor);
}
@Override
public void parse(String fileName) {
if ( canHandleFile(fileName, ".csv")){
System.out.println("A CSV parser is handling the file: "+fileName);
}
else{
super.parse(fileName);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment