xacute.quilt
Class Tools

java.lang.Object
  |
  +--xacute.quilt.Tools

public class Tools
extends java.lang.Object

This class contains useful methods for comparisons that occur in the evaluation of a Quilt expression, and other useful methods.


Constructor Summary
Tools()
           
 
Method Summary
static java.lang.String attOfElt(java.util.Vector hints, java.lang.String eltName)
          Returns the attribute-name corresponding to a given element-name in a Vector consisting of DerefPair.
static boolean compare(int op, boolean b1, boolean b2)
          Performs a comparison between 2 booleans.
static boolean compare(int op, float f1, float f2)
          Performs a comparison between 2 floating numbers.
static boolean compare(int op, java.lang.String s1, java.lang.String s2)
          Performs a comparison between 2 Strings.
static java.lang.String findLocalPart(java.lang.String qName)
          Returns the local part of a QName.
static java.lang.String findQNamePrefix(java.lang.String qName)
          Returns the prefix of a QName, or null if it contains no prefix.
static void reportString(org.xml.sax.DocumentHandler handler, java.lang.String s)
          Reports a PcData to a org.xml.sax.DocumentHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tools

public Tools()
Method Detail

compare

public static boolean compare(int op,
                              float f1,
                              float f2)
Performs a comparison between 2 floating numbers.

compare

public static boolean compare(int op,
                              java.lang.String s1,
                              java.lang.String s2)
Performs a comparison between 2 Strings.

compare

public static boolean compare(int op,
                              boolean b1,
                              boolean b2)
Performs a comparison between 2 booleans.

reportString

public static void reportString(org.xml.sax.DocumentHandler handler,
                                java.lang.String s)
Reports a PcData to a org.xml.sax.DocumentHandler
Parameters:
handler - the DocumentHandler on which events must be triggered
s - the content of the PcData

attOfElt

public static java.lang.String attOfElt(java.util.Vector hints,
                                        java.lang.String eltName)
Returns the attribute-name corresponding to a given element-name in a Vector consisting of DerefPair.
Parameters:
hints - the non-null vector of pairs
eltName - the element-name
Returns:
null if the vector does not contain this element-name.

findQNamePrefix

public static java.lang.String findQNamePrefix(java.lang.String qName)
Returns the prefix of a QName, or null if it contains no prefix.

findLocalPart

public static java.lang.String findLocalPart(java.lang.String qName)
Returns the local part of a QName.