/* File: Mark.java * Contains: A class for simple objects that can be used as marks. * Author: Jeff Dalton * Created: March 1998 * Updated: Fri Mar 27 02:50:21 1998 by Jeff Dalton * Copyright: (c) 1998, AIAI, University of Edinburgh */ package ix.util; /** * A class used when marking objects as used, visited, etc. An algorithm * can create a Mark that is new and hence not == to any Marks created * earlier. The new Mark can then be used to mark objects as they are * vistied (or whatever). Although Marks are meant to be distinguished * by object-identity alone (ie, by ==), they contain some fields for * debugging purposes: a String that names the algorithm that created * the mark, and an int for tellng Marks apart "visually" (e.g. if they're * printed). * * @see Markable */ public class Mark { static int count = 0; String createdBy; int number; public Mark(String createdBy) { this.createdBy = createdBy; this.number = (count++); } }