1 package edu.berkeley.sbp;
4 import java.lang.reflect.*;
5 import java.lang.ref.*;
6 import edu.berkeley.sbp.util.*;
7 import edu.berkeley.sbp.*;
8 import edu.berkeley.sbp.*;
11 * <font color=green>an element which matches some set of one-token-long input strings</font>.
14 * This class is a topology over itself (yes, that's sort of Frege'd
15 * up) so that Atoms can be intersected and unioned with each other
16 * to result in other Atom<T>'s (rather than raw Topology<T>'s, which
17 * are not Elements). If you want the latter, use the
18 * getTokenTopology() method.
21 public abstract class Atom<T> extends Element implements Topology<Atom<T>> {
23 /** the set (topology) of tokens that can match this element */
24 public abstract Topology<T> getTokenTopology();
26 StringBuffer toString(StringBuffer sb) { sb.append(this); return sb; }