/* -------------------------------------------------------------------------- */ /* */ /* LINK INFORMATION STRUCTURE */ /* */ /* Frans Coenen */ /* */ /* Wednesday 19 September 2007 */ /* */ /* Department of Computer Science */ /* The University of Liverpool */ /* */ /* -------------------------------------------------------------------------- */ /** Structure in which to store link information. */ class LinkStruct { /** The line on which the link appears. */ private int lineNumber=0; /** External yes/no. */ private boolean external=true; /** The link lable. */ private String linkLabel=null; /** Set the line number field to the given value. @param n the given value. */ public void setLineNumber(int n) { lineNumber=n; } /** Set the linkLabel field to the given value. @param s the given staring value. */ public void setLinkLabel(String n) { linkLabel=n; } /** Outputs contents as a line of a HTML table. */ public String toString() { String s = "" + (lineNumber+1) + ""; // Test is label exists or not if (linkLabel==null) s = s + "No reference!" + ""; else s = s + linkLabel + ""; // End return(s); } }