From ec5037c01868fecaec2eba89b975f3e53aded89a Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 30 Apr 2016 17:20:53 +0100 Subject: Export from java-mammoth 5f538798b147f0e76 --- Mammoth/Couscous/java/lang/IllegalArgumentException.cs | 8 ++++++++ Mammoth/Couscous/java/lang/IndexOutOfBoundsException.cs | 7 +++++++ Mammoth/Couscous/java/lang/Iterable.cs | 5 +++++ Mammoth/Couscous/java/lang/RuntimeException.cs | 13 +++++++++++++ Mammoth/Couscous/java/lang/String.cs | 7 +++++++ Mammoth/Couscous/java/lang/StringBuilder.cs | 14 ++++++++++++++ .../Couscous/java/lang/UnsupportedOperationException.cs | 7 +++++++ 7 files changed, 61 insertions(+) create mode 100644 Mammoth/Couscous/java/lang/IllegalArgumentException.cs create mode 100644 Mammoth/Couscous/java/lang/IndexOutOfBoundsException.cs create mode 100644 Mammoth/Couscous/java/lang/Iterable.cs create mode 100644 Mammoth/Couscous/java/lang/RuntimeException.cs create mode 100644 Mammoth/Couscous/java/lang/String.cs create mode 100644 Mammoth/Couscous/java/lang/StringBuilder.cs create mode 100644 Mammoth/Couscous/java/lang/UnsupportedOperationException.cs (limited to 'Mammoth/Couscous/java/lang') diff --git a/Mammoth/Couscous/java/lang/IllegalArgumentException.cs b/Mammoth/Couscous/java/lang/IllegalArgumentException.cs new file mode 100644 index 0000000..57ef62b --- /dev/null +++ b/Mammoth/Couscous/java/lang/IllegalArgumentException.cs @@ -0,0 +1,8 @@ +using System; + +namespace Mammoth.Couscous.java.lang { + internal class IllegalArgumentException : RuntimeException { + internal IllegalArgumentException(string message) : base(message) { + } + } +} diff --git a/Mammoth/Couscous/java/lang/IndexOutOfBoundsException.cs b/Mammoth/Couscous/java/lang/IndexOutOfBoundsException.cs new file mode 100644 index 0000000..c56c7c1 --- /dev/null +++ b/Mammoth/Couscous/java/lang/IndexOutOfBoundsException.cs @@ -0,0 +1,7 @@ +using System; + +namespace Mammoth.Couscous.java.lang { + internal class IndexOutOfBoundsException : RuntimeException { + } +} + diff --git a/Mammoth/Couscous/java/lang/Iterable.cs b/Mammoth/Couscous/java/lang/Iterable.cs new file mode 100644 index 0000000..d050b06 --- /dev/null +++ b/Mammoth/Couscous/java/lang/Iterable.cs @@ -0,0 +1,5 @@ +namespace Mammoth.Couscous.java.lang { + internal interface Iterable { + java.util.Iterator iterator(); + } +} diff --git a/Mammoth/Couscous/java/lang/RuntimeException.cs b/Mammoth/Couscous/java/lang/RuntimeException.cs new file mode 100644 index 0000000..cf882aa --- /dev/null +++ b/Mammoth/Couscous/java/lang/RuntimeException.cs @@ -0,0 +1,13 @@ +using System; + +namespace Mammoth.Couscous.java.lang +{ + internal class RuntimeException : Exception { + internal RuntimeException() : base() { + } + + internal RuntimeException(string message) : base(message) { + } + } +} + diff --git a/Mammoth/Couscous/java/lang/String.cs b/Mammoth/Couscous/java/lang/String.cs new file mode 100644 index 0000000..bd0838d --- /dev/null +++ b/Mammoth/Couscous/java/lang/String.cs @@ -0,0 +1,7 @@ +namespace Mammoth.Couscous.java.lang { + internal partial class String { + internal static string join(string separator, Iterable values) { + return string.Join(separator, FromJava.IterableToEnumerable(values)); + } + } +} diff --git a/Mammoth/Couscous/java/lang/StringBuilder.cs b/Mammoth/Couscous/java/lang/StringBuilder.cs new file mode 100644 index 0000000..c894936 --- /dev/null +++ b/Mammoth/Couscous/java/lang/StringBuilder.cs @@ -0,0 +1,14 @@ +namespace Mammoth.Couscous.java.lang { + internal class StringBuilder { + private readonly System.Text.StringBuilder _builder = new System.Text.StringBuilder(); + + internal StringBuilder append(string value) { + _builder.Append(value); + return this; + } + + internal string toString() { + return _builder.ToString(); + } + } +} diff --git a/Mammoth/Couscous/java/lang/UnsupportedOperationException.cs b/Mammoth/Couscous/java/lang/UnsupportedOperationException.cs new file mode 100644 index 0000000..da86874 --- /dev/null +++ b/Mammoth/Couscous/java/lang/UnsupportedOperationException.cs @@ -0,0 +1,7 @@ +using System; + +namespace Mammoth.Couscous.java.lang { + internal class UnsupportedOperationException : RuntimeException { + } +} + -- cgit v1.2.3