1515 */
1616package io .netty .buffer .api ;
1717
18- import io .netty .buffer .api .ComponentProcessor .OfReadable ;
19- import io .netty .buffer .api .ComponentProcessor .OfWritable ;
18+ import io .netty .buffer .api .ComponentProcessor .ReadableComponentProcessor ;
19+ import io .netty .buffer .api .ComponentProcessor .WritableComponentProcessor ;
2020import io .netty .buffer .api .ComponentProcessor .ReadableComponent ;
2121import io .netty .buffer .api .ComponentProcessor .WritableComponent ;
2222
@@ -498,9 +498,9 @@ default void ensureWritable(int size) {
498498
499499 /**
500500 * Get the number of "components" in this buffer, that are readable. These are the components that would be
501- * processed by {@link #forEachReadable(int, OfReadable )}. For composite buffers, this is the number of
502- * transitive constituent buffers that are readable, while non-composite buffers only have at most one readable
503- * component.
501+ * processed by {@link #forEachReadable(int, ReadableComponentProcessor )}. For composite buffers, this is the
502+ * number of transitive constituent buffers that are readable, while non-composite buffers only have at most one
503+ * readable component.
504504 * <p>
505505 * The number of readable components may be less than the {@link #countComponents() component count}, if not all of
506506 * them have readable data.
@@ -511,9 +511,9 @@ default void ensureWritable(int size) {
511511
512512 /**
513513 * Get the number of "components" in this buffer, that are writable. These are the components that would be
514- * processed by {@link #forEachWritable(int, OfWritable )}. For composite buffers, this is the number of
515- * transitive constituent buffers that are writable, while non-composite buffers only have at most one writable
516- * component.
514+ * processed by {@link #forEachWritable(int, WritableComponentProcessor )}. For composite buffers, this is the
515+ * number of transitive constituent buffers that are writable, while non-composite buffers only have at most one
516+ * writable component.
517517 * <p>
518518 * The number of writable components may be less than the {@link #countComponents() component count}, if not all of
519519 * them have space for writing.
@@ -525,14 +525,15 @@ default void ensureWritable(int size) {
525525 /**
526526 * Process all readable components of this buffer, and return the number of components processed.
527527 * <p>
528- * The given {@linkplain OfReadable processor} is called for each readable component in this buffer,
528+ * The given {@linkplain ReadableComponentProcessor processor} is called for each readable component in this buffer,
529529 * and passed a component index, for the given component in the iteration, and a {@link ReadableComponent} object
530530 * for accessing the data within the given component.
531531 * <p>
532532 * The component index is specific to the particular invokation of this method. The first call to the consumer will
533533 * be passed the given initial index, and the next call will be passed the initial index plus one, and so on.
534534 * <p>
535- * The {@linkplain OfReadable component processor} may stop the iteration at any time by returning {@code false}.
535+ * The {@linkplain ReadableComponentProcessor component processor} may stop the iteration at any time by returning
536+ * {@code false}.
536537 * This will cause the number of components processed to be returned as a negative number (to signal early return),
537538 * and the number of components processed may then be less than the
538539 * {@linkplain #countReadableComponents() readable component count}.
@@ -545,7 +546,7 @@ default void ensureWritable(int size) {
545546 * such changes, are any method that requires the buffer to be {@linkplain #isOwned() owned}.
546547 * <p>
547548 * The best way to ensure this doesn't cause any trouble, is to use the buffers directly as part of the iteration,
548- * or immediately after the iteration.
549+ * or immediately after the iteration while we are still in the scope of the method that triggered the iteration .
549550 * <p>
550551 * <strong>Note</strong> that the arrays, memory addresses, and byte buffers exposed as components by this method,
551552 * should not be used for changing the buffer contents. Doing so may cause undefined behaviour.
@@ -554,26 +555,27 @@ default void ensureWritable(int size) {
554555 * this buffer instance.
555556 *
556557 * @param initialIndex The initial index of the iteration, and the index that will be passed to the first call to
557- * the {@linkplain OfReadable #process(int, ReadableComponent) processor}.
558+ * the {@linkplain ReadableComponentProcessor #process(int, ReadableComponent) processor}.
558559 * @param processor The processor that will be used to process the buffer components.
559560 * @return The number of readable components processed, as a positive number of all readable components were
560561 * processed, or as a negative number if the iteration was stopped because
561- * {@link OfReadable #process(int, ReadableComponent)} returned {@code false}.
562+ * {@link ReadableComponentProcessor #process(int, ReadableComponent)} returned {@code false}.
562563 * In any case, the number of components processed may be less than {@link #countComponents()}.
563564 */
564- int forEachReadable (int initialIndex , OfReadable processor );
565+ int forEachReadable (int initialIndex , ReadableComponentProcessor processor );
565566
566567 /**
567568 * Process all writable components of this buffer, and return the number of components processed.
568569 * <p>
569- * The given {@linkplain OfWritable processor} is called for each writable component in this buffer,
570+ * The given {@linkplain WritableComponentProcessor processor} is called for each writable component in this buffer,
570571 * and passed a component index, for the given component in the iteration, and a {@link WritableComponent} object
571572 * for accessing the data within the given component.
572573 * <p>
573574 * The component index is specific to the particular invokation of this method. The first call to the consumer will
574575 * be passed the given initial index, and the next call will be passed the initial index plus one, and so on.
575576 * <p>
576- * The {@link OfWritable component processor} may stop the iteration at any time by returning {@code false}.
577+ * The {@link WritableComponentProcessor component processor} may stop the iteration at any time by returning
578+ * {@code false}.
577579 * This will cause the number of components processed to be returned as a negative number (to signal early return),
578580 * and the number of components processed may then be less than the
579581 * {@linkplain #countReadableComponents() readable component count}.
@@ -586,18 +588,18 @@ default void ensureWritable(int size) {
586588 * such changes, are any method that requires the buffer to be {@linkplain #isOwned() owned}.
587589 * <p>
588590 * The best way to ensure this doesn't cause any trouble, is to use the buffers directly as part of the iteration,
589- * or immediately after the iteration.
591+ * or immediately after the iteration while we are still in the scope of the method that triggered the iteration .
590592 * <p>
591593 * Changes to position and limit of the byte buffers exposed via the processed components, are not reflected back to
592594 * this buffer instance.
593595 *
594596 * @param initialIndex The initial index of the iteration, and the index that will be passed to the first call to
595- * the {@linkplain OfWritable #process(int, WritableComponent) processor}.
597+ * the {@linkplain WritableComponentProcessor #process(int, WritableComponent) processor}.
596598 * @param processor The processor that will be used to process the buffer components.
597599 * @return The number of writable components processed, as a positive number of all writable components were
598600 * processed, or as a negative number if the iteration was stopped because
599- * {@link OfWritable #process(int, WritableComponent)} returned {@code false}.
601+ * {@link WritableComponentProcessor #process(int, WritableComponent)} returned {@code false}.
600602 * In any case, the number of components processed may be less than {@link #countComponents()}.
601603 */
602- int forEachWritable (int initialIndex , OfWritable processor );
604+ int forEachWritable (int initialIndex , WritableComponentProcessor processor );
603605}
0 commit comments