@@ -132,17 +132,14 @@ public static KllFloatsSketch heapify(final MemorySegment srcSeg) {
132132 /**
133133 * Wrap a sketch around the given source MemorySegment containing sketch data that originated from this sketch.
134134 *
135- * <p>If the given MemorySegment is writable and if the {@link KllSketch.SketchStructure SketchStructure} of the MemorySegment is
136- * {@link #UPDATABLE UPDATABLE}, the sketch will be updated and managed totally within the MemorySegment. If the given source
137- * MemorySegment is created off-heap, then all the management of the sketch's internal data will be off-heap as well.<br>< /p>
135+ * <p>The given MemorySegment must be writable and it must contain a <i>KllFloatsSketch</i> in updatable form.
136+ * The sketch will be updated and managed totally within the MemorySegment. If the given source
137+ * MemorySegment is created off-heap, then all the management of the sketch's internal data will be off-heap as well.</p>
138138 *
139139 * <p><b>NOTE:</b>If during updating of the sketch the sketch requires more capacity than the given size of the MemorySegment, the sketch
140140 * will request more capacity using the {@link MemorySegmentRequest MemorySegmentRequest} interface. The default of this interface will
141141 * return a new MemorySegment on the heap.</p>
142142 *
143- * <p>If the given MemorySegment is read-only or if the SketchStructure is not UPDATABLE, than the sketch can be read but not written to
144- * independent of whether the MemorySegment was created on-heap or off-heap.</p>
145- *
146143 * @param srcSeg a MemorySegment that contains sketch data.
147144 * @return an instance of this sketch that wraps the given MemorySegment.
148145 */
@@ -153,26 +150,24 @@ public static KllFloatsSketch wrap(final MemorySegment srcSeg) {
153150 }
154151
155152 /**
156- * Wrap a sketch around the given source MemorySegment containing sketch data that originated from this sketch and including a user
157- * defined {@link MemorySegmentRequest MemorySegmentRequest}.
153+ * Wrap a sketch around the given source MemorySegment containing sketch data that originated from this sketch and including an
154+ * optional, user defined {@link MemorySegmentRequest MemorySegmentRequest}.
158155 *
159- * <p>If the given MemorySegment is writable and if the {@link KllSketch.SketchStructure SketchStructure} of the MemorySegment is
160- * {@link #UPDATABLE UPDATABLE}, the sketch will be updated and managed totally within the MemorySegment. If the given source
161- * MemorySegment is created off-heap, then all the management of the sketch's internal data will be off-heap as well.<br>< /p>
156+ * <p>The given MemorySegment must be writable and it must contain a <i>KllFloatsSketch</i> in updatable form.
157+ * The sketch will be updated and managed totally within the MemorySegment. If the given source
158+ * MemorySegment is created off-heap, then all the management of the sketch's internal data will be off-heap as well.</p>
162159 *
163160 * <p><b>NOTE:</b>If during updating of the sketch the sketch requires more capacity than the given size of the MemorySegment, the sketch
164161 * will request more capacity using the {@link MemorySegmentRequest MemorySegmentRequest} interface. The default of this interface will
165162 * return a new MemorySegment on the heap. It is up to the user to optionally extend this interface if more flexible
166163 * handling of requests for more capacity is required.</p>
167164 *
168- * <p>If the given MemorySegment is read-only or if the SketchStructure is not UPDATABLE, than the sketch can be read,
169- * but not written to, independent of whether the MemorySegment was created on-heap or off-heap.</p>
170- *
171165 * @param srcSeg a MemorySegment that contains sketch data.
172- * @param mSegReq the callback for the sketch to request a larger MemorySegment. It may be null.
166+ * @param mSegReq the MemorySegmentRequest used if the given MemorySegment needs to expand.
167+ * Otherwise, it can be null and the default MemorySegmentRequest will be used.
173168 * @return an instance of this sketch that wraps the given MemorySegment.
174169 */
175- public static KllFloatsSketch writableWrap (final MemorySegment srcSeg , final MemorySegmentRequest mSegReq ) {
170+ public static KllFloatsSketch wrap (final MemorySegment srcSeg , final MemorySegmentRequest mSegReq ) {
176171 Objects .requireNonNull (srcSeg , "Parameter 'srcSeg' must not be null" );
177172 final KllMemorySegmentValidate segVal = new KllMemorySegmentValidate (srcSeg , FLOATS_SKETCH );
178173 return new KllDirectFloatsSketch (srcSeg , segVal , mSegReq );
0 commit comments