Created
January 12, 2013 03:48
-
-
Save sanaulla123/4515951 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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