inactivate method

Map<String, Object> inactivate()
inherited

test で等価性を判断する時に 無効にしたい場合に利用する. 無効化された値を返す.

toMap() に依存.

Implementation

Map<String, Object> inactivate() {
    final edited = toMap().entries.map((e) {
        final value = e.value;
        if (value is ValuePattern) return MapEntry(e.key, value.inactivate());
        if (value is AggregationPattern) return MapEntry(e.key, value.inactivate());
        return MapEntry(e.key, value.toString());
    });
    return Map.fromEntries(edited);
}