|
Drag[en]gine Script Module DragonScript 1.35
|
Clipboard clip storing data in multiple formats. More...
Public Member Functions | |
| Array | collect (Block ablock) |
| Collect data with block receiving object as argument returning true to include. | |
| Array | collectCastable (Block ablock) |
| Collect data with block receiving object as argument returning true to include. | |
| Object | find (Block ablock) |
| Find data with block receiving object as argument returning true if found. | |
| Object | findCastable (Block ablock) |
| Find data with block receiving object as argument returning true if found. | |
| void | forEach (Block ablock) |
| Visit data with block receiving object as argument. | |
| void | forEachCastable (Block ablock) |
| Visit data with block receiving object as argument. | |
| Object | getAt (int index) |
| Data at index. | |
| int | getCount () |
| Count of data. | |
| Object | last () |
| Last data. | |
| ClipboardClip | new (Array data) |
| Create clipboard clip with data. | |
Clipboard clip storing data in multiple formats.
Data is added in the order of the most specific object class to the most generic. Adding String as last entry for non-String objects is not required since the clip consumer has to call toString() on the last data entry if he wants to consume any type of object as string.
Immutable class.
| Array Dragengine.Gui.ClipboardClip.collect | ( | Block | ablock | ) |
Collect data with block receiving object as argument returning true to include.
Returns Array containing all objects for which block returns true.
References forEachCastable().
Referenced by collectCastable().
| Array Dragengine.Gui.ClipboardClip.collectCastable | ( | Block | ablock | ) |
Collect data with block receiving object as argument returning true to include.
Returns Array containing all objects for which block returns true. Block is called only for objects castable to block argument.
References collect(), collectCastable(), find(), and findCastable().
Referenced by collectCastable().
| Object Dragengine.Gui.ClipboardClip.find | ( | Block | ablock | ) |
Find data with block receiving object as argument returning true if found.
Returns first object for which block returns true or null.
References getAt(), and last().
Referenced by collectCastable().
| Object Dragengine.Gui.ClipboardClip.findCastable | ( | Block | ablock | ) |
Find data with block receiving object as argument returning true if found.
Returns first object for which block returns true or null. Block is called only for objects castable to block argument.
References forEach().
Referenced by collectCastable().
| void Dragengine.Gui.ClipboardClip.forEach | ( | Block | ablock | ) |
Visit data with block receiving object as argument.
Referenced by findCastable().
| void Dragengine.Gui.ClipboardClip.forEachCastable | ( | Block | ablock | ) |
Visit data with block receiving object as argument.
Block is only called for objects castable to block argument.
References getCount().
Referenced by collect().
| Object Dragengine.Gui.ClipboardClip.getAt | ( | int | index | ) |
Data at index.
Referenced by find().
| int Dragengine.Gui.ClipboardClip.getCount | ( | ) |
Count of data.
Referenced by forEachCastable(), and new().
| Object Dragengine.Gui.ClipboardClip.last | ( | ) |
Last data.
Referenced by find().
| ClipboardClip Dragengine.Gui.ClipboardClip.new | ( | Array | data | ) |
Create clipboard clip with data.
| ENullPointer | data or entry in data is null. |
| EInvalidParam | data is empty. |
References getCount(), and new().
Referenced by new().