Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for fromString (0.19 sec)

  1. android/guava-tests/test/com/google/common/hash/HashCodeTest.java

        assertThrows(IllegalArgumentException.class, () -> HashCode.fromString("7"));
        HashCode unused = HashCode.fromString("7f");
      }
    
      public void testFromStringFailsWithOddLengthInput() {
        assertThrows(IllegalArgumentException.class, () -> HashCode.fromString("7f8"));
      }
    
      public void testIntWriteBytesTo() {
        byte[] dest = new byte[4];
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/net/HostAndPort.java

    import java.io.Serializable;
    import javax.annotation.CheckForNull;
    
    /**
     * An immutable representation of a host and port.
     *
     * <p>Example usage:
     *
     * <pre>
     * HostAndPort hp = HostAndPort.fromString("[2001:db8::1]")
     *     .withDefaultPort(80)
     *     .requireBracketsForIPv6();
     * hp.getHost();   // returns "2001:db8::1"
     * hp.getPort();   // returns 80
     * hp.toString();  // returns "[2001:db8::1]:80"
     * </pre>
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Aug 22 20:55:57 GMT 2023
    - 11.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/net/HostAndPortTest.java

        assertEquals(80, HostAndPort.fromString("host:80").getPortOrDefault(123));
        assertEquals(123, HostAndPort.fromString("host").getPortOrDefault(123));
      }
    
      public void testHashCodeAndEquals() {
        HostAndPort hpNoPort1 = HostAndPort.fromString("foo::123");
        HostAndPort hpNoPort2 = HostAndPort.fromString("foo::123");
        HostAndPort hpNoPort3 = HostAndPort.fromString("[foo::123]");
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 17 11:19:47 GMT 2023
    - 9.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/hash/HashCode.java

       * lenient {@code base 16} decoding, please use {@link com.google.common.io.BaseEncoding#decode}
       * (and pass the result to {@link #fromBytes}).
       *
       * @since 15.0
       */
      public static HashCode fromString(String string) {
        checkArgument(
            string.length() >= 2, "input string (%s) must have at least 2 characters", string);
        checkArgument(
            string.length() % 2 == 0,
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 12.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/hash/HashCodeTest.java

        assertThrows(IllegalArgumentException.class, () -> HashCode.fromString("7"));
        HashCode unused = HashCode.fromString("7f");
      }
    
      public void testFromStringFailsWithOddLengthInput() {
        assertThrows(IllegalArgumentException.class, () -> HashCode.fromString("7f8"));
      }
    
      public void testIntWriteBytesTo() {
        byte[] dest = new byte[4];
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.1K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

        assertSame(value, cache.getUnchecked(key));
        assertEquals(0, cache.size());
        assertFalse(cache.asMap().containsKey(key));
      }
    
      public void testCacheBuilderFrom_string() {
        CacheBuilder<?, ?> fromString =
            CacheBuilder.from(
                "initialCapacity=10,maximumSize=20,concurrencyLevel=30,"
                    + "weakKeys,weakValues,expireAfterAccess=10m");
        CacheBuilder<?, ?> expected =
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 19.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/net/HostAndPortTest.java

        assertEquals(80, HostAndPort.fromString("host:80").getPortOrDefault(123));
        assertEquals(123, HostAndPort.fromString("host").getPortOrDefault(123));
      }
    
      public void testHashCodeAndEquals() {
        HostAndPort hpNoPort1 = HostAndPort.fromString("foo::123");
        HostAndPort hpNoPort2 = HostAndPort.fromString("foo::123");
        HostAndPort hpNoPort3 = HostAndPort.fromString("[foo::123]");
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 11:19:47 GMT 2023
    - 10K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/primitives/ParseRequest.java

    final class ParseRequest {
      final String rawValue;
      final int radix;
    
      private ParseRequest(String rawValue, int radix) {
        this.rawValue = rawValue;
        this.radix = radix;
      }
    
      static ParseRequest fromString(String stringValue) {
        if (stringValue.length() == 0) {
          throw new NumberFormatException("empty string");
        }
    
        // Handle radix specifier if present
        String rawValue;
        int radix;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 22 13:09:25 GMT 2021
    - 1.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/primitives/UnsignedLongs.java

       *     value
       * @since 13.0
       */
      @CanIgnoreReturnValue
      public static long decode(String stringValue) {
        ParseRequest request = ParseRequest.fromString(stringValue);
    
        try {
          return parseUnsignedLong(request.rawValue, request.radix);
        } catch (NumberFormatException e) {
          NumberFormatException decodeException =
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 17.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/io/Files.java

       *     {@link java.nio.file.Path#toFile() toFile()} if needed. To restrict permissions as this
       *     method does, pass {@code
       *     PosixFilePermissions.asFileAttribute(PosixFilePermissions.fromString("rwx------"))} to your
       *     call to {@code createTempDirectory}.
       */
      @Beta
      @Deprecated
      @J2ObjCIncompatible
      public static File createTempDir() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 33.1K bytes
    - Viewed (0)
Back to top