@Test public void testContains() { System.out.println("contains"); assertEquals(true, EnglishPunctuations.getInstance().contains("[")); assertEquals(true, EnglishPunctuations.getInstance().contains("]")); assertEquals(true, EnglishPunctuations.getInstance().contains("(")); assertEquals(true, EnglishPunctuations.getInstance().contains(")")); assertEquals(true, EnglishPunctuations.getInstance().contains("{")); assertEquals(true, EnglishPunctuations.getInstance().contains("}")); assertEquals(true, EnglishPunctuations.getInstance().contains("<")); assertEquals(true, EnglishPunctuations.getInstance().contains(">")); assertEquals(true, EnglishPunctuations.getInstance().contains(":")); assertEquals(true, EnglishPunctuations.getInstance().contains(",")); assertEquals(true, EnglishPunctuations.getInstance().contains(";")); assertEquals(true, EnglishPunctuations.getInstance().contains("-")); assertEquals(true, EnglishPunctuations.getInstance().contains("--")); assertEquals(true, EnglishPunctuations.getInstance().contains("---")); assertEquals(true, EnglishPunctuations.getInstance().contains("!")); assertEquals(true, EnglishPunctuations.getInstance().contains("?")); assertEquals(true, EnglishPunctuations.getInstance().contains(".")); assertEquals(true, EnglishPunctuations.getInstance().contains("...")); assertEquals(true, EnglishPunctuations.getInstance().contains("`")); assertEquals(true, EnglishPunctuations.getInstance().contains("'")); assertEquals(true, EnglishPunctuations.getInstance().contains("\"")); assertEquals(true, EnglishPunctuations.getInstance().contains("/")); assertEquals(false, EnglishPunctuations.getInstance().contains("")); assertEquals(false, EnglishPunctuations.getInstance().contains("word")); }
@Override public boolean contains(String word) { return dict.contains(word); }
EnglishPunctuations implements Punctuations { @Override public boolean contains(String word) { return dict.contains(word); } }
EnglishPunctuations implements Punctuations { @Override public boolean contains(String word) { return dict.contains(word); } private  EnglishPunctuations(); }
EnglishPunctuations implements Punctuations { @Override public boolean contains(String word) { return dict.contains(word); } private  EnglishPunctuations(); static EnglishPunctuations getInstance(); @Override boolean contains(String word); @Override int size(); @Override Iterator<String> iterator(); }
EnglishPunctuations implements Punctuations { @Override public boolean contains(String word) { return dict.contains(word); } private  EnglishPunctuations(); static EnglishPunctuations getInstance(); @Override boolean contains(String word); @Override int size(); @Override Iterator<String> iterator();  }