-
Notifications
You must be signed in to change notification settings - Fork 2
DsWalkable
| Jump To | Go Back |
Arguments | Methods | Variables |
|---|
Implements: DsLinkedList
A garbage-collected, linear-traversable linked-list with state memory. DsWalkable is designed / for iterable data that is designed to be read in one direction, such as a list of points in a / path. Reading past the end will result in the list looping, thus it will reset itself once it has / been read through fully, otherwise start() must be called to reset.
walker = new DsWalkable( 1, 2, 3, 4, 5 );
while( walker.has_next() ) {
show_debug_message( walker.next() );
}| Name | Type | Purpose |
|---|---|---|
| values... | undef |
none provided |
| Jump To | top |
start | has_next | remaining | next | peek | copy | is |
|---|
Returns: N/A undefined
| Name | Type | Purpose |
|---|---|---|
| at | int |
optional: The index to start at. Default: 0 |
Starts the list at the given entry.
Returns: boolean (true or false)
| Name | Type | Purpose |
|---|---|---|
| None |
Returns true if the list has not yet reached the end
Returns: int (0..)
| Name | Type | Purpose |
|---|---|---|
| None |
Returns the number of links remaining in the list
Returns: Mixed
| Name | Type | Purpose |
|---|---|---|
| None |
Returns the next value in the list
Returns: Mixed
| Name | Type | Purpose |
|---|---|---|
| None |
Returns the value at the current read position without advancing it
Returns: DsWalkable
| Name | Type | Purpose |
|---|---|---|
| None |
Returns a copy of this DsWalkable.
Returns: boolean (true or false)
| Name | Type | Purpose |
|---|---|---|
| type | Constructor |
The Constructor to compare this against. |
Returns true if the provided type is DsWalkable.
| Jump To | top |
|---|
- step - the current link being read, or
undefinedif the list has not started yet - steps - the number of steps that have been taken through the list
Devon Mullane 2020