Series is a set of items organized in an specific order. There is no
restrictions related to duplicates, and does not perform (in an
automatic manner) any ordering (unless wonted) of the elements. A series
can also contain any kind of data type including other series.
The number of items this Series contains.
$list = "one;two;three".getTokens(";")
print $list@length
3
$list1 typeof Series
$list1.add("one")
$list1.add("two")
$list1.add("red,blue".getTokens(","))
print $list1@length
3
The current position of the cursor in the Series, also used to move the
cursor at the wanted position.
$list = "one;two;three".getTokens(";")
PRINT $list@index
0
PRINT $list/$list.index
one
PRINT $list/2
two
$list@index = 3
$nr=$list@index
PRINT $list/$nr
three
Specify whenever the index represents the last element of the series or
not.
$list = "one;two;three".getTokens(";")
PRINT $list@hasNext
true
$list@index = 3
PRINT $list@hasNext
false
Specify whenever the index represents the first element of the series or
not.
$list = "one;two;three".getTokens(";")
PRINT $list@hasPrevious
false
$list@index = 3
PRINT $list@hasPrevious
true
Label: | Has next |
Type: | Logical |
Is Static: | false |
Is Hidden: | true |
Show Empty: | true |
Specify whenever the index represents the last element of the series or not.
Label: | Has previous |
Type: | Logical |
Is Static: | false |
Is Hidden: | true |
Show Empty: | true |
Specify whenever the index represents the first element of the series or
not.
Label: | Index |
Type: | Integer |
Is Static: | false |
Is Hidden: | true |
Show Empty: | true |
Specify the current position of the cursor in the Series, also used to
move the cursor at the wanted position. Initially the index is
positioned at the first element of the series.
Label: | Length |
Type: | Integer |
Is Static: | false |
Is Hidden: | true |
Show Empty: | true |
Specify the number of items this Series contains.
If the concept argument occurs in this Series then his index is
returned, else -1 returned.
Parameters: |
$value : | The concept to add. |
|
Appends the concept given as parameter to the end of this Series.
Returns true if this Series contains the specified concept, false
otherwise.
Returns the concept from the position to which the index point.
Parameters: |
$position : | The index of the required item. |
|
Returns the concept at the specified position or nil
if the
position doesn't exist.
Exceptions: |
noSuchElement :
(Warning) | If the concept does not have such an Element. |
Returns the element with the specified name if it can be found in this
Series, nil otherwise.
Returns a Series containing elements of type String with the name of the
elements defined in this concept.
Parameters: |
$index : | The position at which to insert the Concept. |
$value : | The Concept to be added. |
|
Adds the specified Concept to this Series at the given position.
Parameters: |
$value : | The Concept to be added. |
|
Adds the specified component to the end of this Series.
Returns the next element after the one marked by the index of the series
and sets the index on it.
Returns the element before the one marked by the index of the series and
sets the index on it.
Removes the element marked by the index and sets the index on the next
element, if it is available, on the previous one if it is not.
Removes the element marked by the parameter and sets the index on the next
element, if it is available, on the previous one if it is not.
Sets the index value to the given value.
Parameters: |
$sorter : |
Any SorterConcept. The SorterConcept is a simple concept which contains
at least one method which accepts two concepts as parameters and produce
an integer which has a value of zero if the concepts are equals, +1 if
the first concept is greater than the second and -1 if the first concept
is less than the second. In this way we can provide a simple way to
allow anybody to produce their own sorting methods specially fitted for
their problems and data types.
|
|
Sorts the series. If no parameter is specified it will sort the series
based on the value of the items found in it in alphabetical order. If a
SorterConcept is specified as parameter it's compare method will be used
to produce the sorting of the series.
Returns a stream representing the simple text rendering of this concept.
Returns a stream representing the XML rendering of this concept.