copyright notices/updates
[sbp.git] / src / edu / berkeley / sbp / Atom.java
1 // Copyright 2006 all rights reserved; see LICENSE file for BSD-style license
2
3 package edu.berkeley.sbp;
4 import java.io.*;
5 import java.util.*;
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.*;
11
12 /**
13  *  <font color=green>an element which matches some set of one-token-long input strings</font>.
14  *
15  *  <p>
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()
21  *  method.
22  *  </p>
23  */
24 public abstract class Atom<Token> extends Element implements Topology<Atom<Token>> {
25
26     /** the set (topology) of tokens that can match this element */
27     public abstract Topology<Token>  getTokenTopology();
28
29     StringBuffer toString(StringBuffer sb) { sb.append(this); return sb; }
30
31 }
32
33