An iterable collection of Peer object. Can be created from a string buffer or built up manually.
- Inheritance
- Object
- Iterable<E>
- IterableBase<Peer>
- PeerList
Constructors
- PeerList.empty()
-
Creates a new empty PeerList.
- PeerList.fromMultilineBuffer(String buffer, {String splitOn: '|'})
-
Creates a peerList from a table-formatted string buffer. The format is <header row fields seperated by
splitOn
, terminated by \n> <user rows with fields seperated bysplitOn
, terminated by \n>…
Properties
- first → Peer
-
Returns the first element.…
read-only, inherited - hashCode → int
-
Get a hash code for this object.…
read-only, inherited - isEmpty → bool
-
Returns
true
if there are no elements in this collection.…read-only, inherited - isNotEmpty → bool
-
Returns true if there is at least one element in this collection.…
read-only, inherited - iterator → Iterator<Peer>
-
Iterator forward. We can ignore the keys as they are also stored inside the
Peer
object.read-only - last → Peer
-
Returns the last element.…
read-only, inherited - length → int
-
Returns the number of elements in
this
.…read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited - single → Peer
-
Checks that this iterable has only one element, and returns that element.…
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.…
inherited
Methods
-
add(
Peer peer) → void -
Add a Peer to the list. Replaces the Peer element if it is already present.
-
any(
bool f(E element)) → bool -
Checks whether any element of this iterable satisfies
test
.…inherited -
contains(
Object element) → bool -
Returns true if the collection contains an element equal to
element
.…inherited -
elementAt(
int index) → Peer -
Returns the
index
th element.…inherited -
every(
bool f(E element)) → bool -
Checks whether every element of this iterable satisfies
test
.…inherited -
expand(
Iterable f(E element)) → Iterable -
Expands each element of this
Iterable
into zero or more elements.…inherited -
firstWhere(
bool test(E element), {Peer orElse()}) → Peer -
Returns the first element that satisfies the given predicate
test
.…inherited -
fold(
initialValue, dynamic combine(previousValue, E element)) → dynamic -
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value…
inherited -
forEach(
void f(E element)) → void -
Applies the function
f
to each element of this collection in iteration order.inherited -
get(
String key) → Peer -
Retrive a Peer from the list. Returns null if the element is not present.
-
join(
[String separator = ""]) → String -
Converts each element to a
String
and concatenates the strings.…inherited -
lastWhere(
bool test(E element), {Peer orElse()}) → Peer -
Returns the last element that satisfies the given predicate
test
.…inherited -
map(
dynamic f(E e)) → Iterable -
Returns a new lazy
Iterable
with elements that are created by callingf
on each element of thisIterable
in iteration order.…inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.…
inherited -
reduce(
Peer combine(E value, E element)) → Peer -
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.…
inherited -
singleWhere(
bool test(E element)) → Peer -
Returns the single element that satisfies
test
.…inherited -
skip(
int count) → Iterable<Peer> -
Returns an
Iterable
that provides all but the firstcount
elements.…inherited -
skipWhile(
bool test(E value)) → Iterable<Peer> -
Returns an
Iterable
that skips leading elements whiletest
is satisfied.…inherited -
take(
int count) → Iterable<Peer> -
Returns a lazy iterable of the
count
first elements of this iterable.…inherited -
takeWhile(
bool test(E value)) → Iterable<Peer> -
Returns a lazy iterable of the leading elements satisfying
test
.…inherited -
toJson(
) → List -
JSON representation is an immutable list representation of the PeerList object.
-
toList(
{bool growable: true}) → List<Peer> -
Creates a
List
containing the elements of thisIterable
.…inherited -
toSet(
) → Set<Peer> -
Creates a
Set
containing the same elements as this iterable.…inherited -
toString(
) → String -
Returns a string representation of (some of) the elements of
this
.…inherited -
update(
Peer peer) → void -
Replaces the Peer element if it is already present.
-
where(
bool test(E element)) → Iterable<Peer> -
Returns a new lazy
Iterable
with all elements that satisfy the predicatetest
.…inherited