DataLog<T extends Object> class

A storage that can be used to log data of type T. Each log record is accessed using a unique String key.

Usage:

import 'package:simulated_annealing/simulated_annealing.dart';
final log = DataLog<num>();

// Store values
log.add('temperature', 4.56);
log.add('temperature', 3.78);

// Retrieve record
final temperatures = log['temperature'];
Available Extensions

Constructors

DataLog()

Properties

hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Returns true if keys is empty.
no setter
isNotEmpty bool
Returns true if keys is not empty.
no setter
keys Iterable<String>
Returns the keys that can be used to access the logged records using the methods get and getAll.
no setter
length int
Returns the number of records stored in the log.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(String key, T value) → void
Adds value to the log stored under key.
addAll(List<String> keys, List<T> values) → void
Adds values[i] to the log stored under keys[i].
clear() → void
Clear the log removing all keys and the corresponding records.
containsKey(String key) bool
Returns true if the log keys contain key.
get(String key) List<T>
Returns a view of the record of values logged using key.
getAll(List<String> keys) List<List<T>>
Returns a list with entries of type List<T>. Each inner list contains one instance of the values logged under keys.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String key) List<T>
Returns the record stored under key and deleted it from the log.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited