private int compareValues( Ava that ) { int comp; if ( value.isHumanReadable() ) { comp = value.compareTo( that.value ); return comp; } else { byte[] bytes1 = value.getBytes(); byte[] bytes2 = that.value.getBytes(); for ( int pos = 0; pos < bytes1.length; pos++ ) { int v1 = bytes1[pos] & 0x00FF; int v2 = bytes2[pos] & 0x00FF; if ( v1 > v2 ) { return 1; } else if ( v2 > v1 ) { return -1; } } return 0; } }
private int compareValues( Ava that ) { int comp; if ( value.isHumanReadable() ) { comp = value.compareTo( that.value ); return comp; } else { byte[] bytes1 = value.getBytes(); byte[] bytes2 = that.value.getBytes(); for ( int pos = 0; pos < bytes1.length; pos++ ) { int v1 = bytes1[pos] & 0x00FF; int v2 = bytes2[pos] & 0x00FF; if ( v1 > v2 ) { return 1; } else if ( v2 > v1 ) { return -1; } } return 0; } }
private int compareValues( Ava that ) { int comp; if ( value.isHumanReadable() ) { comp = value.compareTo( that.value ); return comp; } else { byte[] bytes1 = value.getBytes(); byte[] bytes2 = that.value.getBytes(); for ( int pos = 0; pos < bytes1.length; pos++ ) { int v1 = bytes1[pos] & 0x00FF; int v2 = bytes2[pos] & 0x00FF; if ( v1 > v2 ) { return 1; } else if ( v2 > v1 ) { return -1; } } return 0; } }
if ( 0 == val.compareTo( value ) )