ImmutableMap get - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ImmutableMap get method.

This code example shows how to use the following methods:get
     * 
     * @param name The given name 
     * @return The associated stream 
     */ 
    public static Stream stream(String name) {
        return STREAMS.get(name);
    } 
 
} 
6
CodeRank
This code example shows how to use the following methods:get
    public RiversTypesRegistry(ImmutableMap<String, Class<? extends Module>> riverTypes) { 
        this.riverTypes = riverTypes; 
    } 
 
    public Class<? extends Module> type(String type) { 
        return riverTypes.get(type); 
    } 
} 
6
CodeRank
This code example shows how to use the following methods:containsKey, get
    public String getType() {
        return type;
    } 
 
    public boolean hasProperty(String name) {
        return properties.containsKey(name);
    } 
 
    public String getProperty(String name) {
        return properties.get(name);
    } 
 
    public Map<String, String> getProperties() {
        return properties;
    } 
 
    public String getProperty(String name, String defaultValue) {
        if (hasProperty(name)) {
            return properties.get(name);
        } else { 

6
CodeRank
This code example shows how to use the following methods:get
     * 
     * @param type repository type 
     * @return repository module class or null if type is not found 
     */ 
    public Class<? extends Module> type(String type) { 
        return repositoryTypes.get(type); 
    } 
} 
6
CodeRank
This code example shows how to use the following methods:get
        return false; 
    } 
 
    @Override 
    public Object compile(String script) { 
        NativeScriptFactory scriptFactory = scripts.get(script); 
        if (scriptFactory != null) { 
            return scriptFactory; 
        } 
        throw new ElasticsearchIllegalArgumentException("Native script [" + script + "] not found"); 
    } 
 
    @Override 
    public ExecutableScript executable(Object compiledScript, @Nullable Map<String, Object> vars) { 
        NativeScriptFactory scriptFactory = (NativeScriptFactory) compiledScript; 
        return scriptFactory.newScript(vars); 
    } 
 
    @Override 
    public SearchScript search(Object compiledScript, SearchLookup lookup, @Nullable Map<String, Object> vars) { 
6
CodeRank
This code example shows how to use the following methods:containsKey, get
                || fieldName.equals("targetCompatibility") // handled directly by AntScalaCompiler
                || fieldName.equals("optimize") && !optimize;
    } 
 
    protected String getAntPropertyName(String fieldName) {
        if (FIELD_NAMES_TO_ANT_PROPERTIES.containsKey(fieldName)) {
            return FIELD_NAMES_TO_ANT_PROPERTIES.get(fieldName);
        } 
        return fieldName;
    } 
 
    protected Object getAntPropertyValue(String fieldName, Object value) {
        if (fieldName.equals("deprecation")) {
            return toOnOffString(isDeprecation()); 
        } 
        if (fieldName.equals("unchecked")) {
            return toOnOffString(isUnchecked()); 
        } 
        if (fieldName.equals("optimize")) {
            return toOnOffString(isOptimize()); 
6
CodeRank
This code example shows how to use the following methods:get
  } 
 
  @Override 
  public Optional<Path> findDirectoryByPropertiesThenEnvironmentVariable(
      String propertyName, String... environmentVariables) {
    return propertyMap.get(propertyName);
  } 
} 
6
CodeRank
This code example shows how to use the following methods:get
     * 
     * @param field field name as specified in the {@link GetFieldMappingsRequest} 
     * @return FieldMappingMetaData for the requested field or null if not found. 
     */ 
    public FieldMappingMetaData fieldMappings(String index, String type, String field) {
        ImmutableMap<String, ImmutableMap<String, FieldMappingMetaData>> indexMapping = mappings.get(index);
        if (indexMapping == null) {
            return null; 
        } 
        ImmutableMap<String, FieldMappingMetaData> typeMapping = indexMapping.get(type);
        if (typeMapping == null) {
            return null; 
        } 
        return typeMapping.get(field);
    } 
 
    @Override 
    public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
        for (Map.Entry<String, ImmutableMap<String, ImmutableMap<String, FieldMappingMetaData>>> indexEntry : mappings.entrySet()) {
            builder.startObject(indexEntry.getKey(), XContentBuilder.FieldCaseConversion.NONE);
6
CodeRank
This code example shows how to use the following methods:get
This code example shows how to use the following methods:get
get Method Overview
See Code Examples for other Guava ImmutableMap Methods: