NLFormat extends Format { @Override public Object parseObject(String source, ParsePosition pos) { final Collection<? extends Object> results = parseObjects(source, pos); return (results == null || results.isEmpty()) ? null : results.iterator().next(); } protected  NLFormat(CycAccess cyc); static NLFormat getInstance(CycAccess cyc); static NLFormat getInstance(Locale locale, CycAccess cyc); @Override StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos); List<String> formatMultiple(List<? extends Object> objList); @Override Object parseObject(String source, ParsePosition pos); CycObject getFormatLanguageMt(); Object getParseLanguageMt(); Object getDomainMt(); GenerationMode getMode(); Locale getLocale(); Collection<CycObject> getRequiredIsas(); Collection<CycObject> getRequiredGenls(); void setLocale(Locale locale); void setPrecise(boolean b); boolean isPrecise(); boolean shouldDisambiguate(); void setFormatLanguageMt(CycObject languageMt); void setParseLanguageMt(CycObject languageMt); void setDomainMt(CycObject domainMt); void setMode(GenerationMode mode); void setDisambiguate(boolean shouldDisambiguate); void addRequiredIsa(CycObject isa); void addRequiredGenl(CycObject genl); List<? extends Object> parseObjects(String denotationString); Collection<? extends Object> parseObjects(String denotationString, ParsePosition pos); static final CycSymbol DEFAULT; }
@Test public void testParseObject() { System.out.println("parseObject"); String source = "emu"; ParsePosition pos = new ParsePosition(0); NLFormat instance = NLFormat.getInstance(cyc); Object result = instance.parseObject(source, pos); assertEquals(EMU, result); }