Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for checkElementIndex (0.22 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. 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)
  3. 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)
  4. android/guava/src/com/google/common/collect/Lists.java

     * limitations under 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.base.Preconditions.checkPositionIndex;
    import static com.google.common.base.Preconditions.checkPositionIndexes;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 16:48:36 GMT 2024
    - 41.5K bytes
    - Viewed (0)
  5. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/RegularImmutableMap.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 com.google.common.base.Preconditions.checkPositionIndex;
    import static com.google.common.collect.CollectPreconditions.checkEntryNotNull;
    import static java.util.Objects.requireNonNull;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 15 22:32:14 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/ImmutableRangeMap.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 com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  8. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Thu Nov 30 21:54:06 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  9. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 26.3K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ImmutableRangeMap.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 com.google.common.annotations.Beta;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 14.5K bytes
    - Viewed (0)
Back to top