@Override public int compareTo(StaticBuffer other) { assert other instanceof StaticArrayBuffer; return compareTo((StaticArrayBuffer) other); }
protected int compareTo(int length, StaticBuffer buffer, int bufferLen) { assert buffer instanceof StaticArrayBuffer; return compareTo(length, (StaticArrayBuffer)buffer, bufferLen); }
public int compareTo(StaticArrayBuffer other) { return compareTo(array, offset, limit, other.array, other.offset, other.limit); }
protected int compareTo(int length, StaticArrayBuffer buffer, int bufferLen) { assert buffer!=null; Preconditions.checkArgument(length<=length() && bufferLen<=buffer.length()); return compareTo(array, offset, offset+length, buffer.array, buffer.offset, buffer.offset+bufferLen); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null) return false; if (!(o instanceof StaticBuffer)) return false; final StaticBuffer b = (StaticBuffer) o; return length() == b.length() && compareTo(b) == 0; }