Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 35 for fromString (0.23 seconds)

  1. android/guava/src/com/google/common/net/HostAndPort.java

    import java.util.Objects;
    import org.jspecify.annotations.Nullable;
    
    /**
     * An immutable representation of a host and port.
     *
     * <p>Example usage:
     *
     * {@snippet :
     * 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"
     * }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 19:19:10 GMT 2026
    - 11.1K bytes
    - Click Count (0)
  2. build-tools-internal/src/test/java/org/elasticsearch/gradle/internal/BwcVersionsTests.java

        public void testExceptionOnEmpty() {
            new BwcVersions(asList("foo", "bar"), Version.fromString("7.0.0"));
        }
    
        @Test(expected = IllegalStateException.class)
        public void testExceptionOnNonCurrent() {
            new BwcVersions(singletonList(formatVersionToLine("6.5.0")), Version.fromString("7.0.0"));
        }
    
        @Test(expected = IllegalStateException.class)
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Tue Jun 01 09:19:30 GMT 2021
    - 23.7K bytes
    - Click Count (0)
  3. docs/sts/client_grants/sts_element.py

            self.element = element
    
        @classmethod
        def fromstring(cls, root_name, data):
            """Initialize STSElement from name and XML string data.
    
            :param name: Name for XML data. Used in XML errors.
            :param data: string data to be parsed.
            :return: Returns an STSElement.
            """
            try:
                return cls(root_name, cElementTree.fromstring(data))
            except _ETREE_EXCEPTIONS as error:
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 2.5K bytes
    - Click Count (0)
  4. internal/s3select/sql/funceval.go

    		return nil, errIncorrectSQLFunctionArgumentType(err)
    	}
    	return FromString(strings.ToLower(s)), nil
    }
    
    func upperCase(v *Value) (*Value, error) {
    	inferTypeAsString(v)
    	s, ok := v.ToString()
    	if !ok {
    		err := fmt.Errorf("%s expects a string argument", sqlFnUpper)
    		return nil, errIncorrectSQLFunctionArgumentType(err)
    	}
    	return FromString(strings.ToUpper(s)), nil
    }
    
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 13.2K bytes
    - Click Count (0)
  5. 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.isEmpty()) {
          throw new NumberFormatException("empty string");
        }
    
        // Handle radix specifier if present
        String rawValue;
        int radix;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Jan 05 22:13:21 GMT 2026
    - 1.7K bytes
    - Click Count (0)
  6. impl/maven-core/src/main/java/org/apache/maven/configuration/internal/DefaultBeanConfigurator.java

            @Override
            public boolean canConvert(Class<?> type) {
                return Path.class.equals(type);
            }
    
            @Override
            protected Object fromString(String value) throws ComponentConfigurationException {
                return Paths.get(value.replace('/' == File.separatorChar ? '\\' : '/', File.separatorChar));
            }
    
            @Override
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Fri Jun 06 14:28:57 GMT 2025
    - 8.3K bytes
    - Click Count (0)
  7. guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

        assertThat(cache.size()).isEqualTo(0);
        assertThat(cache.asMap().containsKey(key)).isFalse();
      }
    
      public void testCacheBuilderFrom_string() {
        CacheBuilder<?, ?> fromString =
            CacheBuilder.from(
                "initialCapacity=10,maximumSize=20,concurrencyLevel=30,"
                    + "weakKeys,weakValues,expireAfterAccess=10m");
        CacheBuilder<?, ?> expected =
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Sep 30 22:03:28 GMT 2025
    - 20.8K bytes
    - Click Count (0)
  8. 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,
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Aug 11 19:31:30 GMT 2025
    - 12.6K bytes
    - Click Count (0)
  9. internal/s3select/sql/value_test.go

    		return FromInt(0x1337)
    	},
    	func() *Value {
    		t, err := time.Parse(time.RFC3339, "2006-01-02T15:04:05Z")
    		if err != nil {
    			panic(err)
    		}
    		return FromTimestamp(t)
    	},
    	func() *Value {
    		return FromString("string contents")
    	},
    }
    
    // altValueBuilders contains one constructor for each value type.
    // Values are zero values and should NOT match the values in valueBuilders, except Null type.
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 12.4K bytes
    - Click Count (0)
  10. internal/s3select/sql/evaluate.go

    	}
    }
    
    // jsonToValue will convert the json value to an internal value.
    func jsonToValue(result any) (*Value, error) {
    	switch rval := result.(type) {
    	case string:
    		return FromString(rval), nil
    	case float64:
    		return FromFloat(rval), nil
    	case int64:
    		return FromInt(rval), nil
    	case uint64:
    		if rval <= math.MaxInt64 {
    			return FromInt(int64(rval)), nil
    		}
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 12K bytes
    - Click Count (0)
Back to Top