1 // Copyright 2006 all rights reserved; see LICENSE file for BSD-style license
3 package edu.berkeley.sbp;
6 import java.lang.reflect.*;
7 import java.lang.ref.*;
8 import edu.berkeley.sbp.util.*;
9 import edu.berkeley.sbp.*;
10 import edu.berkeley.sbp.*;
13 * <font color=green>an element which matches some set of one-token-long input strings</font>.
16 * This class is a topology over itself (yes, that's sort of <a
17 * href=http://en.wikipedia.org/wiki/Frege>Frege'd</a> up) so that
18 * Atoms can be intersected and unioned with each other to result in
19 * other Atom<Token>'s (rather than raw Topology<Token>'s, which are
20 * not Elements). If you want the latter, use the getTokenTopology()
24 public abstract class Atom<Token> extends Element implements Topology<Atom<Token>> {
26 /** the set (topology) of tokens that can match this element */
27 public abstract Topology<Token> getTokenTopology();
29 StringBuffer toString(StringBuffer sb) { sb.append(this); return sb; }