ParseGraph implements ParseItem { public Optional<ParseValue> current() { return current(ImmutableList.create(this)).computeResult(); } private  ParseGraph(final Token definition); private  ParseGraph(final ParseItem head, final ParseGraph tail, final Token definition, final boolean branched); private  ParseGraph(final ParseItem head, final ParseGraph tail, final Token definition); boolean isEmpty(); Optional<ParseValue> current(); @Override boolean isGraph(); @Override ParseGraph asGraph(); @Override Token getDefinition(); @Override String toString(); @Override boolean equals(final Object obj); @Override int hashCode(); final ParseItem head; final ParseGraph tail; final boolean branched; final Token definition; final long size; static final Token NONE; static final ParseGraph EMPTY; }
@Test public void testCurrent() { assertFalse(EMPTY.current().isPresent()); assertFalse(EMPTY.add(new ParseReference(ZERO, EMPTY_SOURCE, NONE)).current().isPresent()); assertFalse(EMPTY.addBranch(NONE).current().isPresent()); }