using System.Collections.Generic; using Mammoth.Couscous; using Mammoth.Couscous.org.zwobble.mammoth.@internal.results; namespace Mammoth { internal static class SimpleResult { internal static IResult ToResult(this InternalResult result) { var warnings = new HashSet(FromJava.IterableToEnumerable(result.getWarnings())); return new SimpleResult(result.getValue(), warnings); } } internal class SimpleResult : IResult { public T Value { get; } public ISet Warnings { get; } internal SimpleResult(T value, ISet warnings) { Value = value; Warnings = warnings; } } }