|
|
@ -99,7 +99,7 @@ abstract class AbstractSlice<T> extends RocksObject { |
|
|
|
* 2) == 0 if this == other |
|
|
|
* 2) == 0 if this == other |
|
|
|
* 3) > 0 if this > other |
|
|
|
* 3) > 0 if this > other |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public int compare(final AbstractSlice other) { |
|
|
|
public int compare(final AbstractSlice<?> other) { |
|
|
|
assert (other != null); |
|
|
|
assert (other != null); |
|
|
|
assert (isInitialized()); |
|
|
|
assert (isInitialized()); |
|
|
|
return compare0(nativeHandle_, other.nativeHandle_); |
|
|
|
return compare0(nativeHandle_, other.nativeHandle_); |
|
|
@ -118,7 +118,7 @@ abstract class AbstractSlice<T> extends RocksObject { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public boolean equals(final Object other) { |
|
|
|
public boolean equals(final Object other) { |
|
|
|
if (other != null && other instanceof AbstractSlice) { |
|
|
|
if (other != null && other instanceof AbstractSlice) { |
|
|
|
return compare((AbstractSlice)other) == 0; |
|
|
|
return compare((AbstractSlice<?>)other) == 0; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
@ -134,7 +134,7 @@ abstract class AbstractSlice<T> extends RocksObject { |
|
|
|
* @return true when this slice starts with the |
|
|
|
* @return true when this slice starts with the |
|
|
|
* {@code prefix} slice |
|
|
|
* {@code prefix} slice |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public boolean startsWith(final AbstractSlice prefix) { |
|
|
|
public boolean startsWith(final AbstractSlice<?> prefix) { |
|
|
|
if (prefix != null) { |
|
|
|
if (prefix != null) { |
|
|
|
assert (isInitialized()); |
|
|
|
assert (isInitialized()); |
|
|
|
return startsWith0(nativeHandle_, prefix.nativeHandle_); |
|
|
|
return startsWith0(nativeHandle_, prefix.nativeHandle_); |
|
|
|