PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

The Sequence interface | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

The Sequence interface

(バージョン情報なし。おそらく SVN 版にしか存在しないでしょう)

はじめに

A Sequence describes the behaviour of values arranged in a single, linear dimension. Some languages refer to this as a "List". It’s similar to an array that uses incremental integer keys, with the exception of a few characteristics:

  • Values will always be indexed as [0, 1, 2, …, size - 1].
  • Only allowed to access values by index in the range [0, size - 1].

Use cases:

インターフェイス概要

Ds\Sequence implements Ds\Collection {
/* メソッド */
abstract public void allocate ( int $capacity )
abstract public void apply ( callable $callback )
abstract public int capacity ( void )
abstract public bool contains ([ mixed $...values ] )
abstract public Ds\Sequence filter ([ callable $callback ] )
abstract public mixed find ( mixed $value )
abstract public mixed first ( void )
abstract public mixed get ( int $index )
abstract public void insert ( int $index [, mixed $...values ] )
abstract public string join ([ string $glue ] )
abstract public mixed last ( void )
abstract public Ds\Sequence map ( callable $callback )
abstract public Ds\Sequence merge ( mixed $values )
abstract public mixed pop ( void )
abstract public void push ([ mixed $...values ] )
abstract public mixed reduce ( callable $callback [, mixed $initial ] )
abstract public mixed remove ( int $index )
abstract public void reverse ( void )
abstract public Ds\Sequence reversed ( void )
abstract public void rotate ( int $rotations )
abstract public void set ( int $index , mixed $value )
abstract public mixed shift ( void )
abstract public Ds\Sequence slice ( int $index [, int $length ] )
abstract public void sort ([ callable $comparator ] )
abstract public Ds\Sequence sorted ([ callable $comparator ] )
abstract public number sum ( void )
abstract public void unshift ([ mixed $values ] )
}

目次


忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「The Sequence interface」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | The Sequence interface」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: