Skip to content

Commit 0daff53

Browse files
committed
Javadoc
1 parent 3c0e803 commit 0daff53

File tree

5 files changed

+2034
-2178
lines changed

5 files changed

+2034
-2178
lines changed

src/main/java/org/apache/commons/lang3/CharSequenceUtils.java

Lines changed: 43 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -72,43 +72,38 @@ static int indexOf(final CharSequence cs, final CharSequence searchChar, final i
7272
}
7373

7474
/**
75-
* Returns the index within {@code cs} of the first occurrence of the
76-
* specified character, starting the search at the specified index.
75+
* Returns the index within {@code cs} of the first occurrence of the specified character, starting the search at the specified index.
7776
* <p>
78-
* If a character with value {@code searchChar} occurs in the
79-
* character sequence represented by the {@code cs}
80-
* object at an index no smaller than {@code start}, then
81-
* the index of the first such occurrence is returned. For values
82-
* of {@code searchChar} in the range from 0 to 0xFFFF (inclusive),
83-
* this is the smallest value <em>k</em> such that:
77+
* If a character with value {@code searchChar} occurs in the character sequence represented by the {@code cs} object at an index no smaller than
78+
* {@code start}, then the index of the first such occurrence is returned. For values of {@code searchChar} in the range from 0 to 0xFFFF (inclusive), this
79+
* is the smallest value <em>k</em> such that:
8480
* </p>
85-
* <blockquote><pre>
81+
*
82+
* <pre>
8683
* (this.charAt(<em>k</em>) == searchChar) &amp;&amp; (<em>k</em> &gt;= start)
87-
* </pre></blockquote>
88-
* is true. For other values of {@code searchChar}, it is the
89-
* smallest value <em>k</em> such that:
90-
* <blockquote><pre>
84+
* </pre>
85+
* <p>
86+
* is true. For other values of {@code searchChar}, it is the smallest value <em>k</em> such that:
87+
* </p>
88+
*
89+
* <pre>
9190
* (this.codePointAt(<em>k</em>) == searchChar) &amp;&amp; (<em>k</em> &gt;= start)
92-
* </pre></blockquote>
91+
* </pre>
9392
* <p>
94-
* is true. In either case, if no such character occurs inm {@code cs}
95-
* at or after position {@code start}, then
96-
* {@code -1} is returned.
93+
* is true. In either case, if no such character occurs inm {@code cs} at or after position {@code start}, then {@code -1} is returned.
9794
* </p>
9895
* <p>
99-
* There is no restriction on the value of {@code start}. If it
100-
* is negative, it has the same effect as if it were zero: the entire
101-
* {@link CharSequence} may be searched. If it is greater than
102-
* the length of {@code cs}, it has the same effect as if it were
103-
* equal to the length of {@code cs}: {@code -1} is returned.
96+
* There is no restriction on the value of {@code start}. If it is negative, it has the same effect as if it were zero: the entire {@link CharSequence} may
97+
* be searched. If it is greater than the length of {@code cs}, it has the same effect as if it were equal to the length of {@code cs}: {@code -1} is
98+
* returned.
10499
* </p>
105-
* <p>All indices are specified in {@code char} values
106-
* (Unicode code units).
100+
* <p>
101+
* All indices are specified in {@code char} values (Unicode code units).
107102
* </p>
108103
*
109-
* @param cs the {@link CharSequence} to be processed, not null
110-
* @param searchChar the char to be searched for
111-
* @param start the start index, negative starts at the string start
104+
* @param cs the {@link CharSequence} to be processed, not null
105+
* @param searchChar the char to be searched for
106+
* @param start the start index, negative starts at the string start
112107
* @return the index where the search char was found, -1 if not found
113108
* @since 3.6 updated to behave more like {@link String}
114109
*/
@@ -218,31 +213,33 @@ static int lastIndexOf(final CharSequence cs, final CharSequence searchChar, int
218213
}
219214

220215
/**
221-
* Returns the index within {@code cs} of the last occurrence of
222-
* the specified character, searching backward starting at the
223-
* specified index. For values of {@code searchChar} in the range
224-
* from 0 to 0xFFFF (inclusive), the index returned is the largest
225-
* value <em>k</em> such that:
226-
* <blockquote><pre>
216+
* Returns the index within {@code cs} of the last occurrence of the specified character, searching backward starting at the specified index. For values of
217+
* {@code searchChar} in the range from 0 to 0xFFFF (inclusive), the index returned is the largest value <em>k</em> such that:
218+
* </p>
219+
*
220+
* <pre>
227221
* (this.charAt(<em>k</em>) == searchChar) &amp;&amp; (<em>k</em> &lt;= start)
228-
* </pre></blockquote>
229-
* is true. For other values of {@code searchChar}, it is the
230-
* largest value <em>k</em> such that:
231-
* <blockquote><pre>
222+
* </pre>
223+
*
224+
* <p>
225+
* is true. For other values of {@code searchChar}, it is the largest value <em>k</em> such that:
226+
* <p>
227+
*
228+
* <pre>
232229
* (this.codePointAt(<em>k</em>) == searchChar) &amp;&amp; (<em>k</em> &lt;= start)
233-
* </pre></blockquote>
234-
* is true. In either case, if no such character occurs in {@code cs}
235-
* at or before position {@code start}, then {@code -1} is returned.
230+
* </pre>
236231
*
237232
* <p>
238-
* All indices are specified in {@code char} values
239-
* (Unicode code units).
233+
* is true. In either case, if no such character occurs in {@code cs} at or before position {@code start}, then {@code -1} is returned.
234+
* </p>
235+
* <p>
236+
* All indices are specified in {@code char} values (Unicode code units).
240237
* </p>
241238
*
242-
* @param cs the {@link CharSequence} to be processed
243-
* @param searchChar the char to be searched for
244-
* @param start the start index, negative returns -1, beyond length starts at end
245-
* @return the index where the search char was found, -1 if not found
239+
* @param cs the {@link CharSequence} to be processed.
240+
* @param searchChar the char to be searched for.
241+
* @param start the start index, negative returns -1, beyond length starts at end.
242+
* @return the index where the search char was found, -1 if not found.
246243
* @since 3.6 updated to behave more like {@link String}
247244
*/
248245
static int lastIndexOf(final CharSequence cs, final int searchChar, int start) {

src/main/java/org/apache/commons/lang3/ObjectUtils.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,16 +1166,12 @@ public static boolean notEqual(final Object object1, final Object object2) {
11661166
* Checks that the specified object reference is not {@code null} or empty per {@link #isEmpty(Object)}. Use this
11671167
* method for validation, for example:
11681168
*
1169-
* <blockquote>
1170-
*
11711169
* <pre>
11721170
* public Foo(Bar bar) {
11731171
* this.bar = Objects.requireNonEmpty(bar);
11741172
* }
11751173
* </pre>
11761174
*
1177-
* </blockquote>
1178-
*
11791175
* @param <T> the type of the reference.
11801176
* @param obj the object reference to check for nullity.
11811177
* @return {@code obj} if not {@code null}.
@@ -1192,16 +1188,12 @@ public static <T> T requireNonEmpty(final T obj) {
11921188
* Checks that the specified object reference is not {@code null} or empty per {@link #isEmpty(Object)}. Use this
11931189
* method for validation, for example:
11941190
*
1195-
* <blockquote>
1196-
*
11971191
* <pre>
11981192
* public Foo(Bar bar) {
11991193
* this.bar = Objects.requireNonEmpty(bar, "bar");
12001194
* }
12011195
* </pre>
12021196
*
1203-
* </blockquote>
1204-
*
12051197
* @param <T> the type of the reference.
12061198
* @param obj the object reference to check for nullity.
12071199
* @param message the exception message.

0 commit comments

Comments
 (0)