将键值对放入上下文

@param key   键
@param value 值

@return FluentValidator
492794
public FluentValidator putAttribute2Context(String key, Object value) {
        if (context == null) {
            context = new ValidatorContext();
        }
        context.setAttribute(key, value);
        return this;
    }
619294
public Postcard withInt(@Nullable String key, int value) {
        mBundle.putInt(key, value);
        return this;
    }
1273726
public AsyncRestBuilder withParam(String key, String value) {
        this.params.put(key, value);
        return this;
    }
1064226
public Binder<T> attribute(String key, Object value) {
        if (null == value) {
            attributes.remove(value);
        } else {
            attributes.put(key, value);
        }
        return this;
    }
1146917
public static <K, V> Map<K, V> wrap(final String key, final Object value) {
        val map = new LinkedHashMap();
        if (value != null && StringUtils.isNotBlank(key)) {
            map.put(key, value);
        }
        return map;
    }
1046512
public Environment set(@NonNull String key, @NonNull Object value) {
        props.remove(key);
        props.put(key, value.toString());
        return this;
    }
317287
public FormValidation doCheckHome(@QueryParameter File value) {
        // this can be used to check the existence of a file on the server, so needs to be protected
        Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);

        if (value.getPath().isEmpty()) {
            return FormValidation.ok();
        }

        if (!value.isDirectory()) {
            return FormValidation.warning(Messages.ToolDescriptor_NotADirectory(value));
        }

        return checkHomeDirectory(value);
    }
165602
public RunParams param(String key, Object value) {
        params.put(key, value);
        return this;
    }
1233170
@SuppressWarnings(UNUSED)
    public FormValidation doCheckIvySettingsFile(@QueryParameter String value) {
        String v = Util.fixEmpty(value);
        if ((v == null) || (v.length() == 0)) {
            // Null values are allowed.
            return FormValidation.ok();
        }
        if (v.startsWith("/") || v.startsWith("\\") || v.matches("^\\w\\:\\\\.*")) {
            return FormValidation.error("Ivy settings file must be a relative path.");
        }
        return FormValidation.ok();
    }
334101
public String put(final String key, final String Value) {
        return parameters.put(key, Value);
    }
66101
public synchronized TypedProperties putIfAbsent(String key, String value) {
      if (getProperty(key) == null) {
         put(key, value);
      }
      return this;
   }
48072
public static Object putIfAbsent(String key, Object value) {
        return value == null ? CONTEXT.remove(key) : CONTEXT.putIfAbsent(key, value);
    }
922353
@SuppressWarnings("unchecked")
    public Object execute(final Object value, final CsvContext context) {
        
        if(value == null) {
            return next.execute(value, context);
        }
        
        final String stringValue = value.toString();
        final int length = stringValue.length();
        if( length < min || length > max ) {
            throw createValidationException(context)
                .messageFormat("the length (%d) of value '%s' does not lie between the min (%d) and max (%d) values (inclusive)",
                        length, stringValue, min, max)
                .rejectedValue(stringValue)
                .messageVariables("min", getMin())
                .messageVariables("max", getMax())
                .messageVariables("length", length)
                .build();
                
        }
        
        return next.execute(stringValue, context);
    }
401803
public AVIMConversationsQuery whereNotEqualsTo(String key, Object value) {
    conditions.whereNotEqualTo(key, value);
    return this;
  }
317003
public <T> FluentValidator on(T t, Validator<T> v) {
        Preconditions.checkNotNull(v, "Validator should not be NULL");
        composeIfPossible(v, t);
        doAdd(new ValidatorElement(t, v));
        lastAddCount = 1;
        return this;
    }
194322
@SuppressWarnings("unchecked")
    public final FluentModelImplT withTag(String key, String value) {
        if (this.inner().getTags() == null) {
            this.inner().withTags(new HashMap<String, String>());
        }
        this.inner().getTags().put(key, value);
        return (FluentModelImplT) this;
    }
1219695
public String getInvalidMessage(String key) {
        return invalidMessageOverride == null ? messageMixin.lookup(key, messageValueArgs) : MessageFormat.format(
                invalidMessageOverride, messageValueArgs);
    }