public class MFStringObject extends X3DConcreteField implements MFString
SFStringObject
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String[] |
DEFAULT_VALUE
Default value for this field type is an empty array.
|
static java.lang.String |
NAME
String constant NAME provides name of this element: MFString.
|
validationResult| Constructor and Description |
|---|
MFStringObject()
Constructor for MFStringObject performs value initialization.
|
MFStringObject(MFStringObject newValue)
Constructor to copy an MFStringObject value as initial value for this new field object.
|
MFStringObject(java.lang.String newValue)
Constructor to parse String as new initial value.
|
MFStringObject(java.lang.String[] newValue)
Constructor for MFStringObject using a corresponding Java primitive String[] array as new initial value.
|
| Modifier and Type | Method and Description |
|---|---|
MFStringObject |
append(MFStringObject newValue)
Appends a new MFStringObject to the end of the existing value array, increasing the field length accordingly.
|
MFStringObject |
append(SFStringObject newValue)
Appends a new singleton typed value at the end of the existing value array, increasing the field length accordingly.
|
void |
append(java.lang.String newValue)
Places new value(s) at the end of the existing value array, increasing the field length accordingly.
|
void |
append(java.lang.String[] newValue)
Appends another array at the end of the existing value array, increasing the field length accordingly.
|
static java.lang.String |
cleanupEnumerationValue(java.lang.String value)
Utility method for single enumeration value to ignore all whitespace, remove all embedded quotes, remove all commas, and remove all square brackets to create an unadorned enumeration String.
|
MFStringObject |
cleanupEnumerationValues()
Modify current object values to ignore all whitespace, remove all embedded quotes, remove all commas, and remove all square brackets.
|
static java.util.ArrayList<java.lang.String> |
cleanupEnumerationValues(java.util.ArrayList<java.lang.String> values)
Utility method for multiple enumeration values to ignore all whitespace, remove all embedded quotes, remove all commas, and remove all square brackets from a ArrayList of values.
|
static java.lang.String[] |
cleanupEnumerationValues(java.lang.String values)
Utility method for a single String containing multiple enumeration values to ignore all whitespace, remove all embedded quotes, remove all commas, and remove all square brackets to create unadorned MFString elements as a String[] array.
|
static java.lang.String[] |
cleanupEnumerationValues(java.lang.String[] values)
Utility method for multiple enumeration values to ignore all whitespace, remove all embedded quotes, remove all commas, and remove all square brackets in a String[] array.
|
MFStringObject |
cleanupUnescapedEnclosingQuotes()
Modify current object values to trim enclosing quotes and outer whitespace.
|
static java.util.ArrayList<java.lang.String> |
cleanupUnescapedEnclosingQuotes(java.util.ArrayList<java.lang.String> values)
Utility method to trim enclosing quotes and outer whitespace from elements in an ArrayList of arbitrary String values.
|
static java.lang.String |
cleanupUnescapedEnclosingQuotes(java.lang.String singleValue)
Utility method to trim enclosing quotes and outer whitespace from an arbitrary String value, without removing escaped quotation marks (\").
|
static java.lang.String[] |
cleanupUnescapedEnclosingQuotes(java.lang.String[] values)
Utility method to trim enclosing quotes and outer whitespace from elements in an arbitrary String[] array.
|
void |
clear()
Removes all values in the field array, changing the array size to zero.
|
java.lang.String |
get1Value(int index)
Get an individual value from the existing field array.
|
java.lang.String[] |
getPrimitiveValue()
Provides current value of the field as a Java primitive type.
|
void |
getValue(java.lang.String[] valueDestination)
Get the current value of this MFStringObject by copying it into the valueDestination array, leaving the current object unchanged.
|
void |
initialize()
Initialization for MFStringObject applies default initial value.
|
void |
insertValue(int index,
java.lang.String newValue)
Insert a new value prior to the index location in the existing value array, increasing the field length accordingly.
|
void |
remove(int index)
Remove one SFString element of the field array at index position, if found.
|
void |
set1Value(int index,
java.lang.String newValue)
Replace a single value at the appropriate location in the existing value array.
|
void |
setValue(int size,
java.lang.String[] newValue)
Assign an array subset to this field.
|
MFStringObject |
setValue(MFStringObject newValue)
Apply an MFStringObject value to this field.
|
MFStringObject |
setValue(SFStringObject newValue)
Assign a single-field SFStringObject as new array value.
|
void |
setValue(java.lang.String[] newValue)
Assign a new String[] value to this field.
|
MFStringObject |
setValueByString(java.lang.String newValue)
Utility accessor for MFStringObject using String value
|
int |
size()
Get the size of the underlying data array, meaning the number of
simple SFString elements for the given data type.
|
java.lang.String |
toString()
Provides current value as a String.
|
static java.lang.String |
toString(java.lang.String[] value)
Static utility method to provide String representation of a correctly typed input value.
|
java.lang.String |
toStringX3D()
Provide String representation of this object, properly escaped for XML-based X3D syntax.
|
addX3DEventListener, getDefinition, getTupleSize, getValidationResult, isReadable, isWritable, removeX3DEventListener, setReadable, setWritableclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddX3DEventListener, getDefinition, isReadable, isWritable, removeX3DEventListenerpublic static final java.lang.String NAME
public static final java.lang.String[] DEFAULT_VALUE
public MFStringObject()
public MFStringObject(MFStringObject newValue)
newValue - The newValue to applypublic MFStringObject(java.lang.String[] newValue)
newValue - is new value to assign
setContainerFieldOverride(containerFieldName); // apply checksConcreteField#getTupleSize(String)public MFStringObject(java.lang.String newValue)
newValue - is new value to assignpublic void initialize()
initialize in class X3DConcreteFieldpublic MFStringObject cleanupEnumerationValues()
MFStringObject - namely this same object to allow sequential method pipelining (i.e. consecutive
method invocations on the same node object).cleanupUnescapedEnclosingQuotes()public static java.lang.String cleanupEnumerationValue(java.lang.String value)
value - single enumeration string intended for use as an SFString or MFString valuecleanupUnescapedEnclosingQuotes(String)public static java.lang.String[] cleanupEnumerationValues(java.lang.String values)
values - zero or more enumeration values intended for use as an MFString listcleanupUnescapedEnclosingQuotes(String)public static java.lang.String[] cleanupEnumerationValues(java.lang.String[] values)
values - zero or more enumeration values intended for use as an MFString listcleanupEnumerationValue(String),
cleanupEnumerationValues(String),
cleanupUnescapedEnclosingQuotes(String)public static java.util.ArrayList<java.lang.String> cleanupEnumerationValues(java.util.ArrayList<java.lang.String> values)
values - zero or more enumeration values intended for use as an MFString listcleanupEnumerationValue(String),
cleanupEnumerationValues(String),
cleanupUnescapedEnclosingQuotes(String)public MFStringObject cleanupUnescapedEnclosingQuotes()
MFStringObject - namely this same object to allow sequential method pipelining (i.e. consecutive
method invocations on the same node object).cleanupEnumerationValues()public static java.lang.String cleanupUnescapedEnclosingQuotes(java.lang.String singleValue)
singleValue - input String for use with MFString list, which must be unquotedcleanupEnumerationValue(String)public static java.lang.String[] cleanupUnescapedEnclosingQuotes(java.lang.String[] values)
values - String[] array for use with MFString list, which must be unquotedcleanupUnescapedEnclosingQuotes(String),
cleanupEnumerationValue(String),
cleanupEnumerationValues(String)public static java.util.ArrayList<java.lang.String> cleanupUnescapedEnclosingQuotes(java.util.ArrayList<java.lang.String> values)
values - existing ArrayList of String values for use with MFString list, which must be unquotedcleanupUnescapedEnclosingQuotes(String),
cleanupEnumerationValue(String),
cleanupEnumerationValues(String)public MFStringObject setValueByString(java.lang.String newValue) throws InvalidFieldValueException
newValue - is new value to assignMFMatrix4dObject - namely this same object to allow sequential method pipelining (i.e. consecutive
method invocations on the same node object).InvalidFieldValueExceptionpublic static java.lang.String toString(java.lang.String[] value)
value - The value to convert to a StringSFStringObject.toStringX3D(java.lang.String),
toStringX3D(),
X3D Abstract Specification: 5.3.14 SFString and MFString,
X3D XML Encoding: 5.15 SFString and MFString,
X3D Tooltips: Text,
X3D Tooltips: typepublic java.lang.String toStringX3D()
SFStringObject.toStringX3D(java.lang.String),
SFStringObject.toStringX3D(String),
X3D Tooltips: typepublic void getValue(java.lang.String[] valueDestination)
public java.lang.String[] getPrimitiveValue()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String get1Value(int index)
Get an individual value from the existing field array.
If the index is outside the bounds of the current array of data values, an ArrayIndexOutOfBoundsException is thrown.
public void setValue(int size,
java.lang.String[] newValue)
setValue in interface MFStringsize - indicates size of result to copy (i.e. the number of typed singleton values) from beginning of newValue array.newValue - The replacement value array to (potentially) slice and then assign.X3DConcreteField.getTupleSize(String)public void setValue(java.lang.String[] newValue)
newValue - is replacement value array to assignX3DConcreteField.getTupleSize(String)public MFStringObject setValue(SFStringObject newValue)
newValue - The replacement value to assign.MFStringObject - namely this same object to allow sequential method pipelining (i.e. consecutive
method invocations on the same node object).public void set1Value(int index,
java.lang.String newValue)
throws java.lang.ArrayIndexOutOfBoundsException
set1Value in interface MFStringindex - is position of selected value in current arraynewValue - provides new value to applyjava.lang.ArrayIndexOutOfBoundsExceptionX3DConcreteField.getTupleSize(String)public void append(java.lang.String newValue)
append in interface MFStringnewValue - The newValue to appendX3DConcreteField.getTupleSize(String)public void append(java.lang.String[] newValue)
newValue - The newValue to appendX3DConcreteField.getTupleSize(String)public MFStringObject append(SFStringObject newValue)
newValue - The newValue to appendMFStringObject - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).public MFStringObject append(MFStringObject newValue)
newValue - The newValue to appendMFStringObject - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).X3DConcreteField.getTupleSize(String)public void insertValue(int index,
java.lang.String newValue)
insertValue in interface MFStringindex - The position for the inserted value in the current arraynewValue - The newValue to insertX3DConcreteField.getTupleSize(String)public int size()
public void clear()
public void remove(int index)
public MFStringObject setValue(MFStringObject newValue)
newValue - The newValue to applyMFStringObject - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same node object).Copyright ©2005-2017 Web3D Consortium under an open-source license, free for any use. Feedback is welcome.