Class ::xo::OrderedComposite::MethodCompare

::xo::OrderedComposite::MethodCompare[i] create ...

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xotcl::Object[i]
::xotcl::Class create ::xo::OrderedComposite::MethodCompare \
     -superclass ::xotcl::Object

Methods (to be applied on instances)

  • __compare (scripted)

    set by ${:__orderby}
    set x [$a $by]
    set y [$b $by]
    if {$x < $y} {
      return -1
    } elseif {$x > $y} {
      return 1
    } else {
      return 0
    }