diff options
Diffstat (limited to 'Mammoth/Couscous/java')
| -rw-r--r-- | Mammoth/Couscous/java/util/Optional.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Mammoth/Couscous/java/util/Optional.cs b/Mammoth/Couscous/java/util/Optional.cs index b5be056..0f02c89 100644 --- a/Mammoth/Couscous/java/util/Optional.cs +++ b/Mammoth/Couscous/java/util/Optional.cs @@ -15,12 +15,9 @@ namespace Mammoth.Couscous.java.util void ifPresent(Consumer<T> consumer); } - internal class None<T> : Optional<T> { + internal struct None<T> : Optional<T> { internal static readonly None<T> Instance = new None<T>(); - private None() { - } - public bool isPresent() { return false; } @@ -53,7 +50,7 @@ namespace Mammoth.Couscous.java.util } } - internal class Some<T> : Optional<T> { + internal struct Some<T> : Optional<T> { private readonly T _value; internal Some(T value) { |
