new (require("baja/comp/SlotCursor"))()
- Description:
A
Cursorused forSlotiteration.
- Source:
- See:
Extends:
Extends
Methods
actions() → {module:baja/comp/SlotCursor}
- Description:
Adds a filter to the Cursor for Actions.
- Source:
Returns:
itself.
dynamic() → {module:baja/comp/SlotCursor}
- Description:
Adds a filter to the Cursor for dynamic Slots.
- Source:
Returns:
itself.
each(func)
- Description:
Iterate through the Cursor and call a function on every item.
When the function is called,
thisrefers to thecontextthat
was passed in when the Cursor was created.
- Source:
- Inherited From:
Parameters:
| Name | Type | Description |
|---|---|---|
func |
function | function called on every iteration with the 'value' being used as an argument. |
eachDisplay(func)
- Description:
Iterate through the Cursor and call 'each' on every
PropertySlot and
get its displayString.When the function is called, 'this' refers to the associated Complex and the argument
is the display String.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
func |
function | function called on every iteration with the argument being a Property's display String |
eachValue(func)
- Description:
Iterate through the Cursor and call 'each' on every
PropertySlot and
get its value.When the function is called, 'this' refers to the associated
Complex
and the argument is the value of theProperty.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
func |
function | function called on every iteration with the |
equalType(typeSpec) → {module:baja/comp/SlotCursor}
- Description:
Adds a filter for Properties whose Type matches via equals.
This method can take a variable number of TypeSpecs. If a variable number
of TypeSpecs are specified then a slot will be filtered through if any of
the TypeSpecs match (logical OR).
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
typeSpec |
Type | String | Array | the TypeSpec to test against. |
Returns:
itself.
equalValue(value) → {module:baja/comp/SlotCursor}
- Description:
Adds a filter for Property values that match via equals.
This method can take a variable number of values. If a variable number
of values are specified then a slot will be filtered through if any of
the values match (logical OR).
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
value |
the value to be used for equals. |
Returns:
itself.
equivalent(value) → {module:baja/comp/SlotCursor}
- Description:
Adds a filter for Property values that match via equivalent.
This method can take a variable number of values. If a variable number of
values are specified then a slot will be filtered through if any of the
values match (logical OR).
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
value |
the value to be used for equivalent. |
Returns:
itself.
filter(filter) → {baja.FilterCursor}
- Description:
Add a filter function to the Cursor.
- Source:
- Inherited From:
Parameters:
| Name | Type | Description |
|---|---|---|
filter |
function | used to filter the results of the Cursor. |
Returns:
itself.
- Type
- baja.FilterCursor
first()
- Description:
Return the first item in the cursor (regardless of iterative state).
If this is being used as a Slot Cursor, the Slot will be returned.
- Source:
- Inherited From:
Returns:
first item found in the Cursor (or null if nothing found).
firstDisplay() → {String}
- Description:
Return the first
Propertydisplay String in the cursor (regardless of iterative state).
- Source:
Returns:
first Property display String found in the Cursor (or null if nothing found).
- Type
- String
firstValue() → {baja.Value}
- Description:
Return the first
Propertyvalue in the cursor (regardless of iterative state).
- Source:
Returns:
first Property value found in the Cursor (or null if nothing found).
- Type
- baja.Value
flags(flags) → {module:baja/comp/SlotCursor}
- Description:
Adds a filter for Slots that match the requested Slot Flags.
- Source:
- See:
Parameters:
| Name | Type | Description |
|---|---|---|
flags |
Number | the Slot flags to be tested for. |
Returns:
itself.
frozen() → {module:baja/comp/SlotCursor}
- Description:
Adds a filter to the Cursor for frozen Slots.
- Source:
Returns:
itself.
get()
- Description:
Return the current item. If this is a
SlotCursor, this will return a
Slot.
- Source:
- Inherited From:
Returns:
the cursor value (null if none available).
getDisplay() → {String}
- Description:
If the
Slotis aProperty, return its displayString(otherwise return null).
- Source:
Returns:
display String.
- Type
- String
getSize() → {Number}
- Description:
Return the size of the cursor (regardless of iterative state).
- Source:
- Inherited From:
Returns:
- Type
- Number
getValue()
- Description:
If the
Slotis aProperty, return its value (otherwise return null).
- Source:
Returns:
a Property value.
is(typeSpec) → {module:baja/comp/SlotCursor}
- Description:
Adds a filter for Property values that match the TypeSpec via Type#is.
This method can take a variable number of TypeSpecs. If a variable
number of TypeSpecs are specified then a slot will be filtered through
if any of the TypeSpecs match (logical OR).
- Source:
- See:
Parameters:
| Name | Type | Description |
|---|---|---|
typeSpec |
Type | String | the TypeSpec to test against. |
Returns:
itself.
isComplex() → {module:baja/comp/SlotCursor}
- Description:
Adds a filter for Property values that are of Type
baja:Complex
(Type#isComplex).
- Source:
- See:
Returns:
itself.
isComponent() → {module:baja/comp/SlotCursor}
- Description:
Adds a filter for Property values that are of Type
baja:Component
(Type#isComponent).
- Source:
- See:
Returns:
itself.
isEmpty() → {Boolean}
- Description:
Return true if the Cursor is completely empty (regardless of iterative state).
- Source:
- Inherited From:
Returns:
- Type
- Boolean
isNumber() → {module:baja/comp/SlotCursor}
- Description:
Adds a filter for Property values that are of Type
baja:Number
(Type#isNumber).
- Source:
- See:
Returns:
itself.
isSimple() → {module:baja/comp/SlotCursor}
- Description:
Adds a filter for Property values that are of Type
baja:Simple
(Type#isSimple).
- Source:
- See:
Returns:
itself.
isStruct() → {module:baja/comp/SlotCursor}
- Description:
Adds a filter for Property values that are of Type
baja:Struct
(Type#isStruct).
- Source:
- See:
Returns:
itself.
isValue() → {module:baja/comp/SlotCursor}
- Description:
Adds a filter for Property values that are of Type
baja:Value
(Type#isValue).
- Source:
- See:
Returns:
itself.
last()
- Description:
Return the last item in the cursor (regardless of iterative state).
If this is being used as a Slot Cursor, the Slot will be returned.
- Source:
- Inherited From:
Returns:
last item found in the Cursor (or null if nothing found).
lastDisplay() → {String}
- Description:
Return the last
PropertydisplayStringin the cursor (regardless of iterative state).
- Source:
Returns:
last Property display String found in the Cursor (or null if nothing found).
- Type
- String
lastValue() → {baja.Value}
- Description:
Return the last
Propertyvalue in the cursor (regardless of iterative state).
- Source:
Returns:
first Property value found in the Cursor (or null if nothing found).
- Type
- baja.Value
next() → {Boolean}
- Description:
Advance cursor and return true if successful.
- Source:
- Inherited From:
Returns:
- Type
- Boolean
properties() → {module:baja/comp/SlotCursor}
- Description:
Adds a filter to the Cursor for Properties.
- Source:
Returns:
itself.
slotName(slotName) → {module:baja/comp/SlotCursor}
- Description:
Adds a filter for Slots that match the given Slot name.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
slotName |
String | RegExp | a String or Regular Expression for |
Returns:
itself.
toArray() → {Array}
- Description:
Return an array of the cursor results (regardless of iterative state).
If this is a Slot Cursor, this will be an array of Slots.
- Source:
- Inherited From:
Returns:
- Type
- Array
toDisplayArray() → {Array.<String>}
- Description:
Return an array of
PropertydisplayStrings (regardless of iterative state).
- Source:
Returns:
- Type
- Array.<String>
toDisplayMap() → {Object}
- Description:
Return an Object Map of
Propertynames with their corresponding display
Strings (regardless of iterative state).
- Source:
Returns:
- Type
- Object
toMap() → {Object}
- Description:
Return an Object Map of keys with their corresponding values.
If this is a Slot Cursor, this will be a Map of Slot names with their
corresponding Slots (regardless of iterative state).
- Source:
- Inherited From:
Returns:
- Type
- Object
toValueArray() → {Array.<baja.Value>}
- Description:
Return an array of
Propertyvalues (regardless of iterative state).
This will callget()on each slot in the cursor, so please see the
get()documentation for performance notes.
- Source:
- See:
Returns:
- Type
- Array.<baja.Value>
toValueMap() → {Object}
- Description:
Return an Object Map of
Propertynames with their corresponding
values (regardless of iterative state).
- Source:
Returns:
- Type
- Object
topics() → {module:baja/comp/SlotCursor}
- Description:
Adds a filter to the Cursor for Topics.
- Source:
Returns:
itself.