Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 197 for checkArgument (0.09 sec)

  1. guava-tests/benchmark/com/google/common/collect/SortedCopyBenchmark.java

     * or implied. 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.checkArgument;
    import static java.util.Collections.sort;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.caliper.Param;
    import java.util.ArrayList;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

      private static <T> void setImplementation(Class<T> type, Class<? extends T> implementation) {
        checkArgument(type != implementation, "Don't register %s to itself!", type);
        checkArgument(
            !DEFAULTS.containsKey(type), "A default value was already registered for %s", type);
        checkArgument(
            implementations.put(type, implementation) == null,
            "Implementation for %s was already registered",
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.testing;
    
    import static com.google.common.base.Preconditions.checkArgument;
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.base.Throwables.throwIfUnchecked;
    import static junit.framework.Assert.assertEquals;
    import static junit.framework.Assert.fail;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 13:00:28 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/base/PreconditionsTest.java

    public class PreconditionsTest extends TestCase {
      public void testCheckArgument_simple_success() {
        checkArgument(true);
      }
    
      public void testCheckArgument_simple_failure() {
        assertThrows(IllegalArgumentException.class, () -> checkArgument(false));
      }
    
      public void testCheckArgument_simpleMessage_success() {
        checkArgument(true, IGNORE_ME);
      }
    
      public void testCheckArgument_simpleMessage_failure() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 19K bytes
    - Viewed (0)
  5. guava/src/com/google/common/net/HostAndPort.java

       *     of range.
       */
      public static HostAndPort fromParts(String host, int port) {
        checkArgument(isValidPort(port), "Port out of range: %s", port);
        HostAndPort parsedHost = fromString(host);
        checkArgument(!parsedHost.hasPort(), "Host has a port: %s", host);
        return new HostAndPort(parsedHost.host, port, parsedHost.hasBracketlessColons);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jul 22 22:02:22 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  6. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/MapMaker.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.checkArgument;
    
    import com.google.errorprone.annotations.CanIgnoreReturnValue;
    import java.util.concurrent.ConcurrentHashMap;
    import java.util.concurrent.ConcurrentMap;
    
    /**
     * MapMaker emulation.
     *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jan 23 18:43:40 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.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.checkArgument;
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.collect.CollectPreconditions.checkNonnegative;
    
    import com.google.common.annotations.GwtCompatible;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Mar 06 16:06:58 UTC 2023
    - 8.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/SimpleAbstractMultisetTest.java

        }
    
        @Override
        public int add(E element, int occurrences) {
          checkArgument(occurrences >= 0);
          Integer frequency = backingMap.get(element);
          if (frequency == null) {
            frequency = 0;
          }
          if (occurrences == 0) {
            return frequency;
          }
          checkArgument(occurrences <= Integer.MAX_VALUE - frequency);
          backingMap.put(element, frequency + occurrences);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/graph/StandardMutableNetwork.java

          checkArgument(
              existingIncidentNodes.equals(newIncidentNodes),
              REUSING_EDGE,
              edge,
              existingIncidentNodes,
              newIncidentNodes);
          return false;
        }
        NetworkConnections<N, E> connectionsU = nodeConnections.get(nodeU);
        if (!allowsParallelEdges()) {
          checkArgument(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 26 17:43:39 UTC 2021
    - 5.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/math/DoubleUtils.java

     * or implied. See the License for the specific language governing permissions and limitations under
     * the License.
     */
    
    package com.google.common.math;
    
    import static com.google.common.base.Preconditions.checkArgument;
    import static java.lang.Double.MAX_EXPONENT;
    import static java.lang.Double.MIN_EXPONENT;
    import static java.lang.Double.POSITIVE_INFINITY;
    import static java.lang.Double.doubleToRawLongBits;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 5.1K bytes
    - Viewed (0)
Back to top