Adds the and encode value.

@param originalValue the original value
@param newValue the new value
@param encode the encode
@return the string
507716
private String addAndEncodeValue(String originalValue, String newValue,
      boolean encode) {
    return addAndEncode(originalValue, null, newValue, encode);
  }
217042
public com.google.protobuf.ByteString
      getNewValueBytes() {
    java.lang.Object ref = newValue_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      newValue_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
181268
public int append(String stringValue, boolean nullTerminated) {
        if (stringValue != null)
            append(stringValue.getBytes());
        if (nullTerminated)
            append((byte)0);
        return bytesLength;
    }
538475
public void setValue(Object newValue)
    {
    	if (NOT_KNOWN.equals(newValue))
    	{
        	m_proxyField.updateValue();
    		m_proxyField.setNotKnown(true);
    		return;
    	}
    	if (UNKNOWN.equals(newValue))
    	{
    		m_proxyField.reset();
        	m_proxyField.updateValue();
    		return;
    	}
    	m_proxyField.setValue(newValue);
    	m_proxyField.updateValue();
    }
1140078
public final Object encode(Val value) {
      if (value == null) {
         return null;
      }
      return encode(value.get());
   }
531626
public static <T> T defaultIfAbsent(T newValue, T defaultValue) {
    return ofNullable(newValue)
        .orElse(ofNullable(defaultValue)
        .orElse(null));
  }
1016889
public ModelNode setExpression(final String newValue) {
        if (newValue == null) {
            throw new IllegalArgumentException("newValue is null");
        }
        checkProtect();
        value = new ExpressionValue(newValue);
        return this;
    }
160512
def encode(self, value):
        
        if value is None and self._default is not None:
            value = self._default

        for encoder in self._encoders:
            try:
                return encoder(value)
            except ValueError as ex:
                pass

        raise ValueError('Value \'{}\' is invalid. {}'
                         .format(value, ex.message))
757411
private String getNewValue(String newValue, String identify, String htmlClick) {

        String contentString = StringEscapeUtils.escapeHtml4(identify) + "<br/>" + htmlClick + "<br/><br/> ";

        String data = "<br/><br/><br/><span style='color:#FF0000'>New value:</span><br/>";
        contentString = contentString + data + StringEscapeUtils.escapeHtml4(newValue);

        return contentString;
    }
134210
public void setString(String[] newValue) {
        if ( newValue != null ) {
            this.string.setValue(newValue.length, newValue);
        }
    }
592613
public void append(Encoder encoder, EncodingState encodingState, CharSequence str, int off, int len)
            throws IOException {
        if (str == null || len <= 0) {
            return;
        }
        if (shouldEncode(encoder, encodingState)) {
            EncodingState newEncoders = createNewEncodingState(encoder, encodingState);
            if (encoder instanceof StreamingEncoder) {
                ((StreamingEncoder)encoder).encodeToStream(encoder, str, off, len, this, newEncoders);
            }
            else {
                CharSequence source;
                if (CharSequences.canUseOriginalForSubSequence(str, off, len)) {
                    source = str;
                }
                else {
                    source = str.subSequence(off, off + len);
                }
                encodeAndWrite(encoder, newEncoders, source);
            }
        }
        else {
            appendCharSequence(encodingState, str, off, off + len);
        }
    }
927566
public Object encode(Object o) {
        if(o instanceof String) {
            // create a new copy of the String instance            
            return new String((String)o);
        } else if(o instanceof CharSequence) {
            // convert CharSequence to String so that we have a new instance
            return String.valueOf(o);
        } else {
            return o;
        }
    }
305102
public void createEncodedValues(List<EncodedValue> registerNewEncodedValue, String prefix, int index) {
        // define the first 2 speedBits in flags for routing
        registerNewEncodedValue.add(accessEnc = new SimpleBooleanEncodedValue(prefix + "access", true));
        roundaboutEnc = getBooleanEncodedValue(EncodingManager.ROUNDABOUT);
        encoderBit = 1L << index;
    }
412490
void encodeProperty(ByteArrayOutputStream baos, Object value) throws JMSException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "encodeProperty", new Object[]{baos, value});

    super.encodeProperty(baos, value.toString());  // Just call the superclass, with the Integer 'toString'ed

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "encodeProperty");
  }
298857
public static XdmValue newValue(ValueType valueType, Object value) {
        if (value instanceof Text) {
            return ValueFactory.newValue(valueType, ((Text)value).toString());
        } else if (value instanceof BytesWritable) {
            return ValueFactory.newValue(valueType, ((BytesWritable)value).getBytes());
        } else if (value instanceof IntWritable) {
            return ValueFactory.newValue(valueType, ((IntWritable)value).get());
        } else if (value instanceof LongWritable) {
            return ValueFactory.newValue(valueType, ((LongWritable)value).get());
        } else if (value instanceof VIntWritable) {
            return ValueFactory.newValue(valueType, ((VIntWritable)value).get());
        } else if (value instanceof VLongWritable) {
            return ValueFactory.newValue(valueType, ((VLongWritable)value).get());
        } else if (value instanceof BooleanWritable) {
            return ValueFactory.newValue(valueType, ((BooleanWritable)value).get());
        } else if (value instanceof FloatWritable) {
            return ValueFactory.newValue(valueType, ((FloatWritable)value).get());
        } else if (value instanceof DoubleWritable) {
            return ValueFactory.newValue(valueType, ((DoubleWritable)value).get());
        } else if (value instanceof MarkLogicNode) {
            return ValueFactory.newValue(valueType, ((MarkLogicNode)value).get());
        } else {
            throw new UnsupportedOperationException("Value " +  
                    value.getClass().getName() + " is unsupported.");
        }
    }
68133
private String encode(String value) {
    return this.encode.isEncodingRequired() ? UriUtils.encode(value, this.charset) : value;
  }
967070
public String encode(String name, String value) {
        return encode(new DefaultCookie(name, value));
    }