IIdentifiable<K>

Interface used to create data objects that can be uniquely idendified by an ID.

Description

The IIdentifiable interface is used to create data objects that can be uniquely idendified by an ID.

Important points

  • The type specified in the interface defines the type of the ID field.

Fields

id

Unique object identifier of type K.

abstract id: K?

Examples

class MyData implements IIdentifiable<String> {
     @override
     String? id;
     String field1;
     int field2;
    ...
}