/* * ObjectLink.java 2004-11-14 * * Dirk Ansorge, FernUniversitaet Hagen * */ package twodsack.util.graph; /** * This class implements a pointer to an Object and the ability to give that object a number. * It is needed as a support structure for {@link MeshGenerator} and {@link Graph}. There, it is used in * hash tables. For this reason, it implements the methods hashCode and equals. */ class ObjectLink { /* * fields */ protected Object linkedObject; protected int number; /* * constructors */ /** * The default constructor. Fills in default values. */ protected ObjectLink() { this.linkedObject = null; this.number = -1; } /** * Constructs a ObjectLink with passed values. * * @param object the object to be linked to */ protected ObjectLink(Object object) { this.linkedObject = object; this.number = -1; } /* * methods */ /** * Sets the number of this to num. * * @param num the number */ protected void setNumber(int num) { this.number = num; }//end method setNumber }//end class ObjectLink