class SegmentsUtil {

	public static boolean equals(
			MemorySegment[] segments1, int offset1,
			MemorySegment[] segments2, int offset2, int len) {
		if (inFirstSegment(segments1, offset1, len) && inFirstSegment(segments2, offset2, len)) {
			return segments1[0].equalTo(segments2[0], offset1, offset2, len);
		} else {
			return equalsMultiSegments(segments1, offset1, segments2, offset2, len);
		}
	}

}