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

NameTypegetsetDescripton
changeValueObjectcheckedThis returns a value that can later be compared to another value to see whether the collection has changed

Methods

NameDescription
addAdds an item to the collection
containsChecks whether an item is contained in the collection
getItemHashCodeThis should return the hash code for an item
isEmptyWhether the collection is empty or not
removeRemoves an item from the collection
removeAllRemoves all items from the collection
toArrayReturns 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

NameTypeOptionalDefaultDescripton
oItemBiObjectThe item to add

Return Type

void

contains

Checks whether an item is contained in the collection

Syntax

object.contains ( oItem )

Parameters

NameTypeOptionalDefaultDescripton
oItemBiObjectThe item to check for

Return Type

Boolean

getItemHashCode

This should return the hash code for an item

Syntax

object.getItemHashCode ( oItem )

Parameters

NameTypeOptionalDefaultDescripton
oItemBiObjectThe 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

NameTypeOptionalDefaultDescripton
oItemBiObjectThe 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.

Return Type

BiObject[]