public int compareTo(LongBuffer otherBuffer) {int compareRemaining = (remaining() < otherBuffer.remaining()) ? remaining(): otherBuffer.remaining();int thisPos = position;int otherPos = otherBuffer.position;long thisLong, otherLong;while (compareRemaining > 0) {thisLong = get(thisPos);otherLong = otherBuffer.get(otherPos);if (thisLong != otherLong) {return thisLong < otherLong ? -1 : 1;}thisPos++;otherPos++;compareRemaining--;}return remaining() - otherBuffer.remaining();}
public virtual int compareTo(java.nio.LongBuffer otherBuffer){int compareRemaining = (remaining() < otherBuffer.remaining()) ? remaining() : otherBuffer.remaining();int thisPos = _position;int otherPos = otherBuffer._position;long thisLong;long otherLong;while (compareRemaining > 0){thisLong = get(thisPos);otherLong = otherBuffer.get(otherPos);if (thisLong != otherLong){return thisLong < otherLong ? -1 : 1;}thisPos++;otherPos++;compareRemaining--;}return remaining() - otherBuffer.remaining();}