import { Sets } from "polar-shared/src/util/Sets" ; /**
 * Stores members associated with a key.
 *
 * For example, parents and children.
 */ export class KeyMemberSet < K , V > { private members = new Set < V > ( ) ; public constructor ( public readonly key ) { } public add ( member ) { this . members . add ( member ) ; } public set ( members ) { this . members = new Set < V > ( members ) ; } public delete ( member ) { this . members . delete ( member ) ; } public count ( ) { return this . members . size ; } public toArray ( ) { return Sets . toArray ( this . members ) ; } }