# Class CollectionSequence

provide functions for last/1 and first/1 in a collection subset so example: $calls->find(array("direction" => "in", "state" => "started"))->first()

or $messages->find(array("from" => "+3030202")) ->find(array("text" => "Hello")) ->last()

  Catapult\CollectionObject
  Catapult\CollectionSequence

Namespace: Catapult
Located at core/Collections.php

## Methods summary

`public` | # `__construct( data $data, class $class_ = __CLASS__ )` make the data structure according to the type of object then retrieve make the data structure according to the type of object then retrieve #### Parameters $data set of refined data $class_ class object needs to inherit #### Overrides `Catapult\CollectionObject::__construct`
`public` | # `getName( )` Usually defined in child class. When absent resort to class name Usually defined in child class. When absent resort to class name
`public` | # `first( )` Gets the first item in the sequence. Gets the first item in the sequence. #### Overrides `Catapult\CollectionObject::first`
`public` | # `last( )` get the last item in a sequence. get the last item in a sequence. #### Overrides `Catapult\CollectionObject::last`

### Methods inherited from Catapult\CollectionObject

`__toString()`, `add()`, `find()`, `get()`, `isEmpty()`, `listAll()`, `listIterator()`, `reload()`, `setup()`, `toArray()`