diff --git a/primitiveCollections/src/main/java/org/lucares/collections/IntList.java b/primitiveCollections/src/main/java/org/lucares/collections/IntList.java index 8be762c..e695f5c 100644 --- a/primitiveCollections/src/main/java/org/lucares/collections/IntList.java +++ b/primitiveCollections/src/main/java/org/lucares/collections/IntList.java @@ -541,10 +541,13 @@ public final class IntList implements Serializable, Cloneable { /** * Returns the index of the first occurrence of {@code value}, or -1 if it does * not exist. + *
+ * This method uses a binary search algorithm if the list is sorted. * * @param value * the value * @return the index, or -1 + * @see #isSorted() */ public int indexOf(final int value) { return indexOf(value, 0); @@ -553,6 +556,8 @@ public final class IntList implements Serializable, Cloneable { /** * Returns the index of the first occurrence of {@code value} starting at the * {@code offset}'s element, or -1 if it does not exist. + *
+ * This method uses a binary search algorithm if the list is sorted. * * @param value * the value @@ -561,6 +566,7 @@ public final class IntList implements Serializable, Cloneable { * @return the index, or -1 * @throws ArrayIndexOutOfBoundsException * if offset is negative, or larger than the size of the list + * @see #isSorted() */ public int indexOf(final int value, final int offset) {