com.nwalsh.saxon

Class Callout

Implemented Interfaces:
Comparable

public class Callout
extends java.lang.Object
implements Comparable

A class for maintaining information about callouts.

To make processing callouts easier, they are parsed out of the input structure and stored in a sorted array. (The array is sorted according to the order in which the callouts occur.)

This class is just the little record that we store in the array for each callout.

Constructor Summary

Callout(int callout, Element area, int line, int col)
The constructor; initialize the private data structures.

Method Summary

int
compareTo(Object o)
The compareTo method compares this Callout with another.
Element
getArea()
Access the Callout's area.
int
getCallout()
Access the Callout's callout number.
int
getColumn()
Access the Callout's column.
int
getLine()
Access the Callout's line.

Constructor Details

Callout

public Callout(int callout,
               Element area,
               int line,
               int col)
The constructor; initialize the private data structures.

Method Details

compareTo

public int compareTo(Object o)
The compareTo method compares this Callout with another.

Given two Callouts, A and B, A <32B if:

  1. A.line <32B.line, or
  2. A.line = B.line && A.col <32B.col, or
  3. A.line = B.line && A.col = B.col && A.callout <32B.callout
  4. Otherwise, they're equal.

getArea

public Element getArea()
Access the Callout's area.

getCallout

public int getCallout()
Access the Callout's callout number.

getColumn

public int getColumn()
Access the Callout's column.

getLine

public int getLine()
Access the Callout's line.