public int compareTo(LogPosition o) {
        final int val = fileName.compareTo(o.fileName);

        if (val == 0) {
            return (int) (position - o.position);
        }
        return val;
    }
public int compareTo ( LogPosition o ) { final int val = fileName . compareTo ( o . fileName ) ; if ( val == 0 ) { return ( int ) ( position - o . position ) ; } return val ; }
{@inheritDoc}

@see java.lang.Comparable#compareTo(java.lang.Object)