Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for checkElementIndex (0.38 sec)

  1. guava-tests/test/com/google/common/base/PreconditionsTest.java

        }
      }
    
      public void testCheckElementIndex_ok() {
        assertEquals(0, Preconditions.checkElementIndex(0, 1));
        assertEquals(0, Preconditions.checkElementIndex(0, 2));
        assertEquals(1, Preconditions.checkElementIndex(1, 2));
      }
    
      public void testCheckElementIndex_badSize() {
        try {
          Preconditions.checkElementIndex(1, -1);
          fail();
        } catch (IllegalArgumentException expected) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/CartesianList.java

      }
    
      @Override
      public ImmutableList<E> get(int index) {
        checkElementIndex(index, size());
        return new ImmutableList<E>() {
    
          @Override
          public int size() {
            return axes.size();
          }
    
          @Override
          public E get(int axis) {
            checkElementIndex(axis, size());
            int axisIndex = getAxisIndexForProductIndex(index, axis);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/CartesianList.java

      }
    
      @Override
      public ImmutableList<E> get(int index) {
        checkElementIndex(index, size());
        return new ImmutableList<E>() {
    
          @Override
          public int size() {
            return axes.size();
          }
    
          @Override
          public E get(int axis) {
            checkElementIndex(axis, size());
            int axisIndex = getAxisIndexForProductIndex(index, axis);
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/base/PreconditionsTest.java

        }
      }
    
      public void testCheckElementIndex_ok() {
        assertEquals(0, Preconditions.checkElementIndex(0, 1));
        assertEquals(0, Preconditions.checkElementIndex(0, 2));
        assertEquals(1, Preconditions.checkElementIndex(1, 2));
      }
    
      public void testCheckElementIndex_badSize() {
        try {
          Preconditions.checkElementIndex(1, -1);
          fail();
        } catch (IllegalArgumentException expected) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/RegularImmutableList.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import static com.google.common.base.Preconditions.checkElementIndex;
    import static java.util.Objects.requireNonNull;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ObjectCountHashMap.java

      }
    
      @SuppressWarnings("unchecked")
      @ParametricNullness
      K getKey(int index) {
        checkElementIndex(index, size);
        return (K) keys[index];
      }
    
      int getValue(int index) {
        checkElementIndex(index, size);
        return values[index];
      }
    
      void setValue(int index, int newValue) {
        checkElementIndex(index, size);
        values[index] = newValue;
      }
    
      Entry<K> getEntry(int index) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jun 01 22:07:10 GMT 2021
    - 15K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ArrayTable.java

       *     to the number of allowed column keys
       */
      @CheckForNull
      public V at(int rowIndex, int columnIndex) {
        // In GWT array access never throws IndexOutOfBoundsException.
        checkElementIndex(rowIndex, rowList.size());
        checkElementIndex(columnIndex, columnList.size());
        return array[rowIndex][columnIndex];
      }
    
      /**
       * Associates {@code value} with the specified row and column indices. The logic {@code
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 26.3K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/primitives/Bytes.java

     * the License.
     */
    
    package com.google.common.primitives;
    
    import static com.google.common.base.Preconditions.checkArgument;
    import static com.google.common.base.Preconditions.checkElementIndex;
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.base.Preconditions.checkPositionIndexes;
    
    import com.google.common.annotations.GwtCompatible;
    import java.io.Serializable;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/ArrayTable.java

       *     to the number of allowed column keys
       */
      @CheckForNull
      public V at(int rowIndex, int columnIndex) {
        // In GWT array access never throws IndexOutOfBoundsException.
        checkElementIndex(rowIndex, rowList.size());
        checkElementIndex(columnIndex, columnList.size());
        return array[rowIndex][columnIndex];
      }
    
      /**
       * Associates {@code value} with the specified row and column indices. The logic {@code
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 26.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/RegularContiguousSet.java

     * the License.
     */
    
    package com.google.common.collect;
    
    import static com.google.common.base.Preconditions.checkArgument;
    import static com.google.common.base.Preconditions.checkElementIndex;
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.collect.BoundType.CLOSED;
    import static java.util.Objects.requireNonNull;
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 8.4K bytes
    - Viewed (0)
Back to top