examples/STComparator.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 24 Apr 2013 00:07:32 +0100
branchdevelopment
changeset 2549 6ef03f1baa82
parent 2429 ebece4dcaab9
child 2711 a00302fe5083
permissions -rw-r--r--
Bugfix in natives (array reflection). Caused by semi-automatic refactoring of natives.

"{ Package: 'stx:libjava/examples' }"

Object subclass:#STComparator
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Languages-Java-Examples'
!



!STComparator class methodsFor:'initialization'!

initialize

    self lookupObject: JavaLookup instance

    "Created: / 13-05-2012 / 17:24:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !


!STComparator methodsFor:'comparing'!

compare: o1 and: o2
    ^ o1 = o2 ifTrue:[ 
        0 
    ] ifFalse: [
        o1 < o2 ifTrue:[
            -1
        ] ifFalse:[
            1
        ]            
    ]

    "
        STComparator new compare: 1 and: 1
    "

    "Created: / 21-08-2012 / 10:44:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !


!STComparator class methodsFor:'documentation'!

version_CVS
    ^ '$Header: /cvs/stx/stx/libjava/examples/STComparator.st,v 1.2 2013-02-25 11:15:32 vrany Exp $'
!

version_HG

    ^ '$Changeset: <not expanded> $'
!

version_SVN
    ^ '$Id: STComparator.st,v 1.2 2013-02-25 11:15:32 vrany Exp $'
! !


STComparator initialize!