public int compare ( Version other ) { if ( other == null ) throw new NullPointerException ( "other version is null" ) ; if ( this . _version < other . _version ) return - 1 ; if ( this . _version > other . _version ) return 1 ; if ( this . _revision < other . _revision ) return - 1 ; if ( this . _revision > other . _revision ) return 1 ; if ( this . _subrevision < other . _subrevision ) return - 1 ; if ( this . _subrevision > other . _subrevision ) return 1 ; return 0 ; }
Compares with other version . Does not take extension into account as there is no reliable way to order them .