/** * Initializes this StringValue to the value of the given string. * * @param value The string containing the value for this StringValue. */ public StringValue(CharSequence value) { this.value = EMPTY_STRING; setValue(value); }
/** * Initializes this StringValue to a copy the given StringValue. * * @param value The initial value. */ public StringValue(StringValue value) { this.value = EMPTY_STRING; setValue(value); }
/** * Copies a substring of this string into the given target StringValue. The substring begins at * the given <code>start</code> index and ends at <code>end - 1</code>. * * @param target The StringValue object to copy the substring to. * @param start The beginning index, inclusive. * @param end The ending index, exclusive. * @exception IndexOutOfBoundsException Thrown, if the start is negative, or the end is larger * than the length. */ public void substring(StringValue target, int start, int end) { target.setValue(this, start, end - start); }
/** * Sets the value of the StringValue to a substring of the given string. * * @param value The new string value. * @param offset The position to start the substring. * @param len The length of the substring. */ public void setValue(StringValue value, int offset, int len) { checkNotNull(value); setValue(value.value, offset, len); }
/** * Sets the value of the StringValue to the given string. * * @param value The new string value. */ @Override public void setValue(StringValue value) { checkNotNull(value); setValue(value.value, 0, value.len); }
/** * Sets the value of the StringValue to the given string. * * @param value The new string value. */ public void setValue(CharSequence value) { checkNotNull(value); setValue(value, 0, value.length()); }
/** * Initializes the StringValue to a sub-string of the given StringValue. * * @param value The string containing the substring. * @param offset The offset of the substring. * @param len The length of the substring. */ public StringValue(StringValue value, int offset, int len) { this.value = EMPTY_STRING; setValue(value, offset, len); }