首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

SplDoublyLinkedList (class)

Introduction

(PHP 5 >= 5.3.0, PHP 7)

The SplDoublyLinkedList class provides the main functionalities of a doubly linked list.

Class synopsis

SplDoublyLinkedList implements Iterator , ArrayAccess , Countable {

/* Methods */

public __construct ( void )

代码语言:javascript
复制
public void add ( mixed $index , mixed $newval )
代码语言:javascript
复制
public mixed bottom ( void )
代码语言:javascript
复制
public int count ( void )
代码语言:javascript
复制
public mixed current ( void )
代码语言:javascript
复制
public int getIteratorMode ( void )
代码语言:javascript
复制
public bool isEmpty ( void )
代码语言:javascript
复制
public mixed key ( void )
代码语言:javascript
复制
public void next ( void )
代码语言:javascript
复制
public bool offsetExists ( mixed $index )
代码语言:javascript
复制
public mixed offsetGet ( mixed $index )
代码语言:javascript
复制
public void offsetSet ( mixed $index , mixed $newval )
代码语言:javascript
复制
public void offsetUnset ( mixed $index )
代码语言:javascript
复制
public mixed pop ( void )
代码语言:javascript
复制
public void prev ( void )
代码语言:javascript
复制
public void push ( mixed $value )
代码语言:javascript
复制
public void rewind ( void )
代码语言:javascript
复制
public string serialize ( void )
代码语言:javascript
复制
public void setIteratorMode ( int $mode )
代码语言:javascript
复制
public mixed shift ( void )
代码语言:javascript
复制
public mixed top ( void )
代码语言:javascript
复制
public void unserialize ( string $serialized )
代码语言:javascript
复制
public void unshift ( mixed $value )
代码语言:javascript
复制
public bool valid ( void )

}

Table of Contents

  • SplDoublyLinkedList::add — Add/insert a new value at the specified index
  • SplDoublyLinkedList::bottom — Peeks at the node from the beginning of the doubly linked list
  • SplDoublyLinkedList::__construct — Constructs a new doubly linked list
  • SplDoublyLinkedList::count — Counts the number of elements in the doubly linked list.
  • SplDoublyLinkedList::current — Return current array entry
  • SplDoublyLinkedList::getIteratorMode — Returns the mode of iteration
  • SplDoublyLinkedList::isEmpty — Checks whether the doubly linked list is empty.
  • SplDoublyLinkedList::key — Return current node index
  • SplDoublyLinkedList::offsetExists — Returns whether the requested $index exists
  • SplDoublyLinkedList::offsetGet — Returns the value at the specified $index
  • SplDoublyLinkedList::offsetSet — Sets the value at the specified $index to $newval
  • SplDoublyLinkedList::offsetUnset — Unsets the value at the specified $index
  • SplDoublyLinkedList::pop — Pops a node from the end of the doubly linked list
  • SplDoublyLinkedList::prev — Move to previous entry
  • SplDoublyLinkedList::push — Pushes an element at the end of the doubly linked list
  • SplDoublyLinkedList::rewind — Rewind iterator back to the start
  • SplDoublyLinkedList::serialize — Serializes the storage
  • SplDoublyLinkedList::setIteratorMode — Sets the mode of iteration
  • SplDoublyLinkedList::shift — Shifts a node from the beginning of the doubly linked list
  • SplDoublyLinkedList::unserialize — Unserializes the storage
  • SplDoublyLinkedList::unshift — Prepends the doubly linked list with an element
  • SplDoublyLinkedList::valid — Check whether the doubly linked list contains more nodes

SplDoublyLinkedList::add →

代码语言:txt
复制
 ? 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com