Determine the painter given the defaults and a key.

@param  defaults the defaults.
@param  key      the key.

@return the painter, if any can be found, {@code null} otherwise.
344355
private SeaGlassPainter getPainter(TreeMap<String, Object> defaults, String key) {
        Object p = defaults.get(key);

        if (p instanceof UIDefaults.LazyValue) {
            p = ((UIDefaults.LazyValue) p).createValue(UIManager.getDefaults());
        }

        return (p instanceof SeaGlassPainter ? (SeaGlassPainter) p : null);
    }
1127263
public java.lang.String getBetaSettingsOrDefault(
      java.lang.String key,
      java.lang.String defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetBetaSettings().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
458661
@VisibleForTesting
  public static boolean register(PropertyKey key) {
    String name = key.getName();
    String[] aliases = key.getAliases();
    if (DEFAULT_KEYS_MAP.containsKey(name)) {
      if (DEFAULT_KEYS_MAP.get(name).isBuiltIn() || !key.isBuiltIn()) {
        return false;
      }
    }
    DEFAULT_KEYS_MAP.put(name, key);
    if (aliases != null) {
      for (String alias : aliases) {
        DEFAULT_ALIAS_MAP.put(alias, key);
      }
    }
    return true;
  }
1169378
public function default($key, $default = null)
	{
		if($this->has($key))
			return $this->get($key);

		$this->put($key, $default);

		return $default;
	}
187893
public alluxio.grpc.TierList getAddedBlocksOnTiersOrDefault(
      java.lang.String key,
      alluxio.grpc.TierList defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, alluxio.grpc.TierList> map =
        internalGetAddedBlocksOnTiers().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
1203737
public function themeIsDefault($key = null) : bool
    {
        if ($key instanceof Theme) {
            return $key->getKey() === $this->getDefaultTheme()->getKey();
        }

        return $this->getTheme($key)->getKey() === $this->getDefaultTheme()->getKey();
    }
1129746
@Override
    public Color getColor( final String     key,
                           final Color      defaultValue )
    {
        return formatColor( key, getFormattedPropValue( key ), defaultValue );
    }
1118378
public java.lang.String getRetOrDefault(
      java.lang.String key,
      java.lang.String defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetRet().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
691442
@Override
	public final Bitmap get(String key) {
		if (key == null) {
			throw new NullPointerException("key == null");
		}

		synchronized (this) {
			return map.get(key);
		}
	}
104065
public org.tensorflow.framework.SignatureDef getSignatureDefOrDefault(
      java.lang.String key,
      org.tensorflow.framework.SignatureDef defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, org.tensorflow.framework.SignatureDef> map =
        internalGetSignatureDef().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
283577
public static String getStringValue(String key, String defaultValue) {
        return getStringValue(null, key, defaultValue);
    }
925780
private Class<?> getKey(Class<?> key)
	{
		Class<?> newKey = lookupMap.get(key);
		if (newKey != null)
			return newKey;

		for (Class<?> c : internalMap.keySet())
		{
			if (c.isAssignableFrom(key))
			{
				lookupMap.put(key, c);
				return c;
			}
		}
		return null;
	}
1317961
public List<String> getStringList(final String key, final List<String> defaultValue) {
    if (containsKey(key)) {
      return getStringList(key);
    } else {
      return defaultValue;
    }
  }
126846
public String get(String key, String defaultValue) {
        String v = get(key);
        if (v==null)    v=defaultValue;
        return v;
    }
138571
public boolean getBoolean(String key) {
		addToDefaults(key, null);
		String value = getRequired(key);
		return Boolean.valueOf(value);
	}
1284473
public String get(String key, String defaultValue) {
        String value = parameters.get(key);
        return StringUtils.isBlank(value) ? defaultValue : value;
    }
521617
public String getProperty(String key, String defaultValue) {
        String value = resolver.get(key);
        return (value == null) ? defaultValue : value;
    }