checkpoint
[sbp.git] / src / edu / berkeley / sbp / Atom.java
1 package edu.berkeley.sbp;
2 import java.io.*;
3 import java.util.*;
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.*;
9
10 /**
11  *  <font color=green>an element which matches some set of one-token-long input strings</font>.
12  *
13  *  This class is a topology over itself so that Atoms can be
14  *  intersected and unioned with each other to result in other
15  *  Atom<T>'s (rather than raw Topology<T>'s, which are not Elements).
16  *  If you want the latter, use the getTokenTopology() method.
17  */
18 public abstract class Atom<T> extends Element implements Topology<Atom<T>> {
19
20     /** the set (topology) of tokens that can match this element */
21     public abstract Topology<T>  getTokenTopology();
22
23     public abstract StringBuffer toString(StringBuffer sb);
24 }
25