BList

platdb.BList
trait BList extends Iterable

A list of strings

Attributes

Graph
Supertypes
trait Iterable
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

def +:=(elem: String): Unit

Convenient method, equivalent to prepend

Convenient method, equivalent to prepend

Attributes

def :+=(elem: String): Unit

Convenient method, equivalent to append

Convenient method, equivalent to append

Attributes

def append(elem: String): Try[Unit]

Add an element to the tail

Add an element to the tail

Attributes

def append(elems: Seq[String]): Try[Unit]

Add several elements to the tail

Add several elements to the tail

Attributes

def apply(n: Int): String

Convenient methods for retrieving elements

Convenient methods for retrieving elements

Attributes

def drop(n: Int): Try[Unit]

Delete the first n elements

Delete the first n elements

Attributes

def dropRight(n: Int): Try[Unit]

Delete n elements at the end of the list

Delete n elements at the end of the list

Attributes

def exists(p: String => Boolean): Boolean

Does the element that meets the condition exist

Does the element that meets the condition exist

Attributes

def filter(p: String => Boolean): BList

Filter elements to obtain a read-only sublist

Filter elements to obtain a read-only sublist

Attributes

def find(p: String => Boolean): Int

Find the index of the first element that meets the condition, and return -1 if it does not exist

Find the index of the first element that meets the condition, and return -1 if it does not exist

Attributes

def get(idx: Int): Try[String]

Retrieve elements based on subscripts

Retrieve elements based on subscripts

Attributes

def head: Try[String]

Return list header element

Return list header element

Attributes

def init: BList

The list obtained after removing the end element is in read-only mode

The list obtained after removing the end element is in read-only mode

Attributes

def insert(index: Int, elem: String): Try[Unit]

Insert an element at the index position

Insert an element at the index position

Attributes

def insert(index: Int, elems: Seq[String]): Try[Unit]

Insert multiple elements at index position

Insert multiple elements at index position

Attributes

def isEmpty: Boolean

Is the current list empty

Is the current list empty

Attributes

def last: Try[String]

Return the element at the end of the list

Return the element at the end of the list

Attributes

def name: String

name

name

Attributes

def prepend(elem: String): Try[Unit]

Insert an element into the head

Insert an element into the head

Attributes

def prepend(elems: Seq[String]): Try[Unit]

Insert multiple elements into the head

Insert multiple elements into the head

Attributes

def remove(index: Int): Try[Unit]

Delete an element

Delete an element

Attributes

def remove(index: Int, count: Int): Try[Unit]

Delete multiple elements

Delete multiple elements

Attributes

Invert the list, and the obtained inverse list is in read-only mode

Invert the list, and the obtained inverse list is in read-only mode

Attributes

def set(index: Int, elem: String): Try[Unit]

Update element

Update element

Attributes

def slice(from: Int, until: Int): Try[BList]

List slicing operation, obtaining a sub list in read-only mode

List slicing operation, obtaining a sub list in read-only mode

Attributes

def tail: BList

The list obtained after removing the header element is in read-only mode

The list obtained after removing the header element is in read-only mode

Attributes

def take(n: Int): Try[BList]

Get the first n elements, and the obtained sublist is read-only

Get the first n elements, and the obtained sublist is read-only

Attributes

def takeRight(n: Int): Try[BList]

Obtain the last n elements, and the obtained sublist is read-only

Obtain the last n elements, and the obtained sublist is read-only

Attributes

def update(index: Int, elem: String): Unit

A convenient method for updating elements, equivalent to set

A convenient method for updating elements, equivalent to set

Attributes

Inherited methods

def iterator: CollectionIterator

return a collection iterator object.

return a collection iterator object.

Attributes

Inherited from:
Iterable
def length: Long

the elements number of current collection.

the elements number of current collection.

Attributes

Inherited from:
Iterable