public boolean equals(Object other) {if (!(other instanceof DoubleBuffer)) {return false;}DoubleBuffer otherBuffer = (DoubleBuffer) other;if (remaining() != otherBuffer.remaining()) {return false;}int myPosition = position;int otherPosition = otherBuffer.position;boolean equalSoFar = true;while (equalSoFar && (myPosition < limit)) {double a = get(myPosition++);double b = otherBuffer.get(otherPosition++);equalSoFar = a == b || (a != a && b != b);}return equalSoFar;}

public override bool Equals(object other){if (!(other is java.nio.DoubleBuffer)){return false;}java.nio.DoubleBuffer otherBuffer = (java.nio.DoubleBuffer)other;if (remaining() != otherBuffer.remaining()){return false;}int myPosition = _position;int otherPosition = otherBuffer._position;bool equalSoFar = true;while (equalSoFar && (myPosition < _limit)){double a = get(myPosition++);double b = otherBuffer.get(otherPosition++);equalSoFar = a == b || (a != a && b != b);}return equalSoFar;}
