BiSelectionItemCollection
This class is used internally inside BiSelectionModel to keep track of the selected items. If you create a custom selection model you might need to also create a custom selection model item collection. The type of the items is not very important but the selection model needs to be able to work with this type. You also need to override getItemHashCode if the items are not instances of BiObject.
This class extends BiObject and therefore all methods and fields available for BiObject are also available for BiSelectionItemCollection .
Constructor
new BiSelectionItemCollection ( )
Parameters
No parameters.
Properties
| Name | Type | get | set | Descripton |
changeValue | Object | ![]() | This returns a value that can later be compared to another value to see whether the collection has changed |
Methods
| Name | Description |
add | Adds an item to the collection |
contains | Checks whether an item is contained in the collection |
getItemHashCode | This should return the hash code for an item |
isEmpty | Whether the collection is empty or not |
remove | Removes an item from the collection |
removeAll | Removes all items from the collection |
toArray | Returns an array with the items in the collection |
Events
None.
Static Methods
None.
Static Fields
None.
Remarks
None.
Method Details
add
Adds an item to the collection
Syntax
object.add ( oItem ) Parameters
| Name | Type | Optional | Default | Descripton |
oItem | | The item to add |
Return Type
void
contains
Checks whether an item is contained in the collection
Syntax
object.contains ( oItem ) Parameters
| Name | Type | Optional | Default | Descripton |
oItem | | The item to check for |
Return Type
Boolean
getItemHashCode
This should return the hash code for an item
Syntax
object.getItemHashCode ( oItem ) Parameters
| Name | Type | Optional | Default | Descripton |
oItem | | The item to get the hash code for. |
Return Type
String
isEmpty
Whether the collection is empty or not
Syntax
object.isEmpty ( ) Parameters
No arguments.
Return Type
Boolean
remove
Removes an item from the collection
Syntax
object.remove ( oItem ) Parameters
| Name | Type | Optional | Default | Descripton |
oItem | | The item to remove |
Return Type
void
removeAll
Removes all items from the collection
Syntax
object.removeAll ( ) Parameters
No arguments.
Return Type
void
toArray
Returns an array with the items in the collection
Syntax
object.toArray ( ) Parameters
No arguments.
