<?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>
<!DOCTYPE interface-description SYSTEM 'file:///usr/pkgsrc/lang/oo2c/work.macaroon/oo2c_32-2.0.11/rsrc/OOC/xml/interface-description.dtd'>
<interface-description name='ADT:Comparator' id=''>
  <oberon-doc>
    <summary>Note: The class <oberon-type href='#Comparator'>Comparator</oberon-type> is modeled after from Java class <samp>java.util.Comparator</samp>, from which the documentation is also derived.</summary>
    <p pad-after='yes' no-indent='yes'>Note: The class <oberon-type href='#Comparator'>Comparator</oberon-type> is modeled after from Java class <samp>java.util.Comparator</samp>, from which the documentation is also derived.</p>
  </oberon-doc>
  <import-decl name='Object' id='Object' export='no' module='Object'/>
  <import-decl name='-RT0' id='-RT0' export='no' module='RT0'/>
  <import-decl name='-Object' id='-Object' export='no' module='Object'/>
  <import-decl name='-Exception' id='-Exception' export='no' module='Exception'/>
  <class name='Comparator'>
    <type-decl name='Comparator' id='Comparator' export='yes'>
      <type>
        <pointer>
          <pointer-base>
            <type-name name='ComparatorDesc' href='#ComparatorDesc'/>
          </pointer-base>
        </pointer>
      </type>
    </type-decl>
    <type-decl name='ComparatorDesc' id='ComparatorDesc' export='yes'>
      <type>
        <record/>
      </type>
    </type-decl>
    <procedure name='Compare' id='ComparatorDesc.Compare' export='yes'>
      <oberon-doc>
        <summary>Compares its two arguments for order.</summary>
        <p pad-after='yes' no-indent='yes'>Compares its two arguments for order.  Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.</p>
        <p pad-after='yes' no-indent='no'>The implementor must ensure that <samp>sgn(Compare(x, y)) = -sgn(Compare(y, x))</samp> for all <samp>x</samp> and <samp>y</samp>. (This implies that <samp>Compare(x, y)</samp> must throw an exception if and only if <samp>Compare(y, x)</samp> throws an exception.)</p>
        <p pad-after='yes' no-indent='no'>The implementor must also ensure that the relation is transitive: <samp>((Compare(x, y)&gt;0) &amp; (Compare(y, z)&gt;0))</samp> implies <samp>Compare(x, z)&gt;0</samp>.</p>
        <p pad-after='yes' no-indent='no'>Finally, the implementer must ensure that <samp>Compare(x, y)=0</samp> implies that <samp>sgn(Compare(x, z))==sgn(Compare(y, z))</samp> for all <samp>z</samp>.</p>
        <p pad-after='yes' no-indent='no'>It is generally the case, but not strictly required that <samp>(Compare(x, y)==0) == (x.Equals(y))</samp>.  Generally speaking, any comparator that violates this condition should clearly indicate this fact.  The recommended language is "Note: this comparator imposes orderings that are inconsistent with <samp>Equals()</samp>."</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='cmp' id='ComparatorDesc.Compare.cmp' export='no' variable-parameter='no'>
          <type>
            <type-name name='Comparator' href='#Comparator'/>
          </type>
        </receiver-decl>
        <parameter-decl name='o1' id='ComparatorDesc.Compare.o1' export='no' variable-parameter='no'>
          <type>
            <type-name module='Object' name='Object' href='Object#Object'/>
          </type>
        </parameter-decl>
        <parameter-decl name='o2' id='ComparatorDesc.Compare.o2' export='no' variable-parameter='no'>
          <type>
            <type-name module='Object' name='Object' href='Object#Object'/>
          </type>
        </parameter-decl>
        <result-type>
          <type-name module='#predef' name='LONGINT'/>
        </result-type>
      </formal-parameters>
    </procedure>
    <base-class module='Object' class='Object' href='Object#Object'>
      <inherited-method module='Object' name='Equals' class='Object' href='Object#ObjectDesc.Equals'/>
      <inherited-method module='Object' name='HashCode' class='Object' href='Object#ObjectDesc.HashCode'/>
      <inherited-method module='Object' name='ToString' class='Object' href='Object#ObjectDesc.ToString'/>
    </base-class>
  </class>
  <class name='String'>
    <type-decl name='String' id='String' export='yes'>
      <type>
        <pointer>
          <pointer-base>
            <type-name name='StringDesc' href='#StringDesc'/>
          </pointer-base>
        </pointer>
      </type>
    </type-decl>
    <type-decl name='StringDesc' id='StringDesc' export='no'>
      <type>
        <record/>
      </type>
    </type-decl>
    <procedure name='Compare' id='StringDesc.Compare' export='yes'>
      <doc-inherited-from module='ADT:Comparator' name='Compare' class='Comparator' href='#ComparatorDesc.Compare'/>
      <oberon-doc>
        <summary>Compares its two arguments for order.</summary>
        <p pad-after='yes' no-indent='yes'>Compares its two arguments for order.  Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.</p>
        <p pad-after='yes' no-indent='no'>The implementor must ensure that <samp>sgn(Compare(x, y)) = -sgn(Compare(y, x))</samp> for all <samp>x</samp> and <samp>y</samp>. (This implies that <samp>Compare(x, y)</samp> must throw an exception if and only if <samp>Compare(y, x)</samp> throws an exception.)</p>
        <p pad-after='yes' no-indent='no'>The implementor must also ensure that the relation is transitive: <samp>((Compare(x, y)&gt;0) &amp; (Compare(y, z)&gt;0))</samp> implies <samp>Compare(x, z)&gt;0</samp>.</p>
        <p pad-after='yes' no-indent='no'>Finally, the implementer must ensure that <samp>Compare(x, y)=0</samp> implies that <samp>sgn(Compare(x, z))==sgn(Compare(y, z))</samp> for all <samp>z</samp>.</p>
        <p pad-after='yes' no-indent='no'>It is generally the case, but not strictly required that <samp>(Compare(x, y)==0) == (x.Equals(y))</samp>.  Generally speaking, any comparator that violates this condition should clearly indicate this fact.  The recommended language is "Note: this comparator imposes orderings that are inconsistent with <samp>Equals()</samp>."</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='cmp' id='StringDesc.Compare.cmp' export='no' variable-parameter='no'>
          <type>
            <type-name name='String' href='#String'/>
          </type>
        </receiver-decl>
        <parameter-decl name='o1' id='StringDesc.Compare.o1' export='no' variable-parameter='no'>
          <type>
            <type-name module='Object' name='Object' href='Object#Object'/>
          </type>
        </parameter-decl>
        <parameter-decl name='o2' id='StringDesc.Compare.o2' export='no' variable-parameter='no'>
          <type>
            <type-name module='Object' name='Object' href='Object#Object'/>
          </type>
        </parameter-decl>
        <result-type>
          <type-name module='#predef' name='LONGINT'/>
        </result-type>
      </formal-parameters>
      <redefined-method module='ADT:Comparator' name='Compare' class='Comparator' href='#ComparatorDesc.Compare'/>
    </procedure>
    <base-class module='ADT:Comparator' class='Comparator' href='#Comparator'>
      <inherited-method module='ADT:Comparator' name='Compare' class='Comparator' href='#ComparatorDesc.Compare'/>
      <base-class module='Object' class='Object' href='Object#Object'>
        <inherited-method module='Object' name='Equals' class='Object' href='Object#ObjectDesc.Equals'/>
        <inherited-method module='Object' name='HashCode' class='Object' href='Object#ObjectDesc.HashCode'/>
        <inherited-method module='Object' name='ToString' class='Object' href='Object#ObjectDesc.ToString'/>
      </base-class>
    </base-class>
  </class>
  <module-ref name='Object'>
    <ref-target type='html' relative-uri='../Object.html'/>
  </module-ref>
</interface-description>
