Package | weavejs.api.core |
Interface | public interface ILinkableHashMap extends ILinkableCompositeObject, ILinkableObject |
Implementors | LinkableHashMap |
See also
Property | Defined By | ||
---|---|---|---|
childListCallbacks : IChildListCallbackInterface [read-only]
This is an interface for adding and removing callbacks that will get triggered immediately
when an object is added or removed. | ILinkableHashMap | ||
typeRestriction : Class [read-only]
The child type restriction, or null if there is none. | ILinkableHashMap |
Method | Defined By | ||
---|---|---|---|
generateUniqueName(baseName:String):String
This will generate a new name for an object that is different from all the names of objects previously used in this LinkableHashMap. | ILinkableHashMap | ||
getName(object:ILinkableObject):String
This function gets the name of the specified object in the LinkableHashMap. | ILinkableHashMap | ||
getNames(filter:Class = null, filterIncludesPlaceholders:Boolean = false):Array
This function returns an ordered list of names in the LinkableHashMap. | ILinkableHashMap | ||
getObject(name:String):ILinkableObject
This function gets the object associated with the specified name. | ILinkableHashMap | ||
getObjects(filter:Class = null, filterIncludesPlaceholders:Boolean = false):Array
This function returns an ordered list of objects in the LinkableHashMap. | ILinkableHashMap | ||
![]() | getSessionState():Array
This gets the session state of this composite object. | ILinkableCompositeObject | |
objectIsLocked(name:String):Boolean
This function will return true if the specified object was previously locked. | ILinkableHashMap | ||
removeAllObjects():void
This function attempts to removes all objects from this LinkableHashMap. | ILinkableHashMap | ||
removeObject(name:String):void
This function removes an object from the LinkableHashMap. | ILinkableHashMap | ||
renameObject(oldName:String, newName:String):ILinkableObject
This function will rename an object by making a copy and removing the original. | ILinkableHashMap | ||
requestObject(name:String, classDef:Class, lockObject:Boolean = false):*
This function creates an object in the LinkableHashMap if it doesn't already exist. | ILinkableHashMap | ||
This function will copy the session state of an ILinkableObject to a new object under the given name in this LinkableHashMap. | ILinkableHashMap | ||
setNameOrder(newOrder:Array):void
This will reorder the names returned by getNames(). | ILinkableHashMap | ||
setObject(name:String, object:ILinkableObject, lockObject:Boolean = false):void
Sets an entry in the LinkableHashMap, replacing any existing object under the same name. | ILinkableHashMap | ||
![]() | setSessionState(newState:Array, removeMissingDynamicObjects:Boolean):void
This sets the session state of this composite object. | ILinkableCompositeObject | |
toMap(filter:Class = null, filterIncludesPlaceholders:Boolean = false):Object
This function returns a Map containing the entries in the LinkableHashMap. | ILinkableHashMap | ||
toObject(filter:Class = null, filterIncludesPlaceholders:Boolean = false):Object
This function returns an Object mapping names to objects contained in the LinkableHashMap. | ILinkableHashMap |
childListCallbacks | property |
childListCallbacks:IChildListCallbackInterface
[read-only] This is an interface for adding and removing callbacks that will get triggered immediately when an object is added or removed.
public function get childListCallbacks():IChildListCallbackInterface
typeRestriction | property |
typeRestriction:Class
[read-only] The child type restriction, or null if there is none.
public function get typeRestriction():Class
generateUniqueName | () | method |
public function generateUniqueName(baseName:String):String
This will generate a new name for an object that is different from all the names of objects previously used in this LinkableHashMap.
Parameters
baseName:String — The name to start with. If the name is already in use, an integer will be appended to create a unique name.
|
String |
getName | () | method |
public function getName(object:ILinkableObject):String
This function gets the name of the specified object in the LinkableHashMap.
Parameters
object:ILinkableObject — An object contained in this LinkableHashMap.
|
String — The name associated with the object, or null if the object was not found.
|
getNames | () | method |
public function getNames(filter:Class = null, filterIncludesPlaceholders:Boolean = false):Array
This function returns an ordered list of names in the LinkableHashMap.
Parameters
filter:Class (default = null ) — If specified, names of objects that are not of this type will be filtered out.
| |
filterIncludesPlaceholders:Boolean (default = false ) — If true, matching LinkablePlaceholders will be included in the results.
|
Array — A copy of the ordered list of names of objects contained in this LinkableHashMap.
|
getObject | () | method |
public function getObject(name:String):ILinkableObject
This function gets the object associated with the specified name.
Parameters
name:String — The name identifying an object in the LinkableHashMap.
|
ILinkableObject — The object associated with the given name.
|
getObjects | () | method |
public function getObjects(filter:Class = null, filterIncludesPlaceholders:Boolean = false):Array
This function returns an ordered list of objects in the LinkableHashMap.
Parameters
filter:Class (default = null ) — If specified, objects that are not of this type will be filtered out.
| |
filterIncludesPlaceholders:Boolean (default = false ) — If true, matching LinkablePlaceholders will be included in the results.
|
Array — An ordered Array of objects that correspond to the names returned by getNames(filter).
|
objectIsLocked | () | method |
public function objectIsLocked(name:String):Boolean
This function will return true if the specified object was previously locked.
Parameters
name:String — The name of an object.
|
Boolean |
removeAllObjects | () | method |
public function removeAllObjects():void
This function attempts to removes all objects from this LinkableHashMap. Any objects that are locked will remain.
removeObject | () | method |
public function removeObject(name:String):void
This function removes an object from the LinkableHashMap.
Parameters
name:String — The identifying name of an object previously saved with setObject().
|
renameObject | () | method |
public function renameObject(oldName:String, newName:String):ILinkableObject
This function will rename an object by making a copy and removing the original.
Parameters
oldName:String — The name of an object to replace.
| |
newName:String — The new name to use for the copied object.
|
ILinkableObject — The copied object associated with the new name, or the original object if newName is the same as oldName.
|
requestObject | () | method |
public function requestObject(name:String, classDef:Class, lockObject:Boolean = false):*
This function creates an object in the LinkableHashMap if it doesn't already exist. If there is an existing object associated with the specified name, it will be kept if it is the specified type, or replaced with a new instance of the specified type if it is not.
Parameters
name:String — The identifying name of a new or existing object.
| |
classDef:Class — The Class of the desired object type.
| |
lockObject:Boolean (default = false ) — If this is true, the object will be locked in place under the specified name.
|
* — The object under the requested name of the requested type, or null if an error occurred.
|
requestObjectCopy | () | method |
public function requestObjectCopy(name:String, objectToCopy:ILinkableObject):ILinkableObject
This function will copy the session state of an ILinkableObject to a new object under the given name in this LinkableHashMap.
Parameters
name:String — A name for the object to be initialized in this LinkableHashMap.
| |
objectToCopy:ILinkableObject — An object to copy the session state from.
|
ILinkableObject — The new object of the same type, or null if an error occurred.
|
setNameOrder | () | method |
public function setNameOrder(newOrder:Array):void
This will reorder the names returned by getNames(). Any names appearing in newOrder that do not appear in getNames() will be ignored. Callbacks will be called if the new name order differs from the old order.
Parameters
newOrder:Array — The new desired ordering of names.
|
setObject | () | method |
public function setObject(name:String, object:ILinkableObject, lockObject:Boolean = false):void
Sets an entry in the LinkableHashMap, replacing any existing object under the same name.
Parameters
name:String — The identifying name to associate with an object.
| |
object:ILinkableObject — If this is true, the object will be locked in place under the specified name.
| |
lockObject:Boolean (default = false )
|
toMap | () | method |
public function toMap(filter:Class = null, filterIncludesPlaceholders:Boolean = false):Object
This function returns a Map containing the entries in the LinkableHashMap.
Parameters
filter:Class (default = null ) — If specified, objects that are not of this type will be filtered out.
| |
filterIncludesPlaceholders:Boolean (default = false ) — If true, matching LinkablePlaceholders will be included in the results.
|
Object — A Map containing the ordered entries in the LinkableHashMap.
|
toObject | () | method |
public function toObject(filter:Class = null, filterIncludesPlaceholders:Boolean = false):Object
This function returns an Object mapping names to objects contained in the LinkableHashMap.
Parameters
filter:Class (default = null ) — If specified, objects that are not of this type will be filtered out.
| |
filterIncludesPlaceholders:Boolean (default = false ) — If true, matching LinkablePlaceholders will be included in the results.
|
Object — An Object mapping names to objects contained in the LinkableHashMap.
|