part of optional_internal; class _Absent extends Iterable implements Optional { const _Absent(); const _Absent._internal(); @override T get value => throw NoValuePresentError(); @override int get length => 0; @override bool get isPresent => false; @override Optional filter(bool Function(T) predicate) => empty.cast(); @override Optional flatMap(Optional Function(T) mapper) => empty.cast(); @override Optional map(R Function(T) mapper) => empty.cast(); @override bool contains(Object? val) => false; @override T orElse(T other) => other; @override T? orElseNullable(T? other) => other; @override T? get orElseNull => null; @override T orElseGet(T Function() supply) => supply(); @override T? orElseGetNullable(T? Function() supply) => supply(); @override Future orElseGetAsync(Future Function() supply) => supply(); @override Future orElseGetNullableAsync(Future Function() supply) async => supply(); @override T orElseThrow(Object Function() supplyError) => throw supplyError(); @override void ifPresent(void Function(T) consume, {void Function()? orElse}) => orElse == null ? null : orElse(); @override int get hashCode => 0; @override bool operator ==(Object other) => other is _Absent; @override String toString() => 'Optional[empty]'; @override Optional cast() => _Absent(); @override bool get isEmpty => true; @override bool get isNotEmpty => false; @override Iterator get iterator => UnmodifiableSetView.empty().iterator; }