public class CollectionWrapper extends MBScriptableObject implements org.mozilla.javascript.Wrapper, ModifiableWrapper
Modifier and Type | Field and Description |
---|---|
protected com.brightech.xmp.model.ResourceList |
myDelegate
Delegate.
|
protected java.lang.String |
myType
Collection type.
|
myLogger
Modifier | Constructor and Description |
---|---|
|
CollectionWrapper()
Default Constructor (for rhino).
|
protected |
CollectionWrapper(org.mozilla.javascript.Scriptable theScope,
org.mozilla.javascript.Scriptable thePrototype,
java.lang.String theType) |
protected |
CollectionWrapper(java.lang.String theType) |
Modifier and Type | Method and Description |
---|---|
CollectionWrapper |
jsFunction_addAll(org.mozilla.javascript.NativeArray theItems)
Adds all values to the collection
|
CollectionWrapper |
jsFunction_addItem(java.lang.Object theItem)
Appends the specified item to the collection.
|
void |
jsFunction_clear()
Method to remove all elements in the collection.
|
boolean |
jsFunction_contains(java.lang.Object theValue)
Test collection to see if it contains a specified value.
|
org.mozilla.javascript.NativeArray |
jsFunction_filter(org.mozilla.javascript.NativeFunction theFunction)
Filter the items in the collection based on a provided JS function
|
void |
jsFunction_forEach(org.mozilla.javascript.NativeFunction theFunction)
Executes a javascript forEach function on each element of the array
|
int |
jsFunction_indexOf(java.lang.Object theValue)
Returns the index of the value in the collection.
|
boolean |
jsFunction_isEmpty()
Returns true if empty, false if not.
|
java.lang.String |
jsFunction_join(java.lang.String theJoin)
Returns the item list as a string joined by the provided delimiter
|
CollectionWrapper |
jsFunction_remove(java.lang.Object theItem)
Removes the specified item from the collection.
|
CollectionWrapper |
jsFunction_set(org.mozilla.javascript.NativeArray theItems)
Sets the Collection to a value
|
java.lang.String |
jsFunction_toString()
Returns the string form of the collection in valid JSON
|
CollectionIterator |
jsGet_iterator()
Returns an iterator over the elements in this list in proper sequence.
|
int |
jsGet_length()
Returns the number of components in the collection.
|
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
protected com.brightech.xmp.model.ResourceList myDelegate
protected java.lang.String myType
public CollectionWrapper()
protected CollectionWrapper(java.lang.String theType)
protected CollectionWrapper(org.mozilla.javascript.Scriptable theScope, org.mozilla.javascript.Scriptable thePrototype, java.lang.String theType)
public CollectionIterator jsGet_iterator()
public CollectionWrapper jsFunction_addItem(java.lang.Object theItem) throws com.brightech.xmp.model.xmlmodel.MalformedXmpFieldException
theItem
- the item to be appended.com.brightech.xmp.model.xmlmodel.MalformedXmpFieldException
public CollectionWrapper jsFunction_addAll(org.mozilla.javascript.NativeArray theItems) throws com.brightech.xmp.model.xmlmodel.MalformedXmpFieldException
theItems
- the Items to addcom.brightech.xmp.model.xmlmodel.MalformedXmpFieldException
public CollectionWrapper jsFunction_set(org.mozilla.javascript.NativeArray theItems) throws com.brightech.xmp.model.xmlmodel.MalformedXmpFieldException
theItems
- the items to setcom.brightech.xmp.model.xmlmodel.MalformedXmpFieldException
public CollectionWrapper jsFunction_remove(java.lang.Object theItem)
theItem
- the item to be removed.public boolean jsFunction_contains(java.lang.Object theValue)
theValue
- The test value.public int jsGet_length()
public void jsFunction_clear()
public boolean jsFunction_isEmpty()
public int jsFunction_indexOf(java.lang.Object theValue)
theValue
- public java.lang.String jsFunction_join(java.lang.String theJoin)
theJoin
- the delimiter to join onpublic void jsFunction_forEach(org.mozilla.javascript.NativeFunction theFunction)
theFunction
- the javascript functionpublic org.mozilla.javascript.NativeArray jsFunction_filter(org.mozilla.javascript.NativeFunction theFunction)
theFunction
- the javascript functionpublic java.lang.String jsFunction_toString()
Copyright © 2023 MediaBeacon, Inc. All Rights Reserved.