EntityImpl<T extends Object> class

Entity implementation

Implemented types
Mixed-in types

Constructors

EntityImpl(T data, EntityValidator validator)
Constructor Create an entity with data validated by validator
const

Properties

data → T
Data
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
validator EntityValidator
Data validator
final

Methods

copyWith({T? data, EntityValidator? validator}) EntityImpl<T>
Copy constructor
createSnapshot() Entity<T>
Crates a snapshot of validator preserving it's current EntityValidator.isValid value
override
invalidate() Entity<T>
Creates an invalid entity out of this one
override
isValid() bool
If true cached entity is valid.
inherited
map<R extends Object>(R mapper(T)) Entity<R>
Transforms Entity data to another entity data with mapper Validation remains the same
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize() String
A way to serialize entity
inherited
toString() String
A string representation of this object.
override

Operators

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