Skip to content

Commit 643200e

Browse files
authored
Stubs for some exercises (exercism#2232)
1 parent 7887876 commit 643200e

6 files changed

Lines changed: 56 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import java.util.List;
2+
import java.util.function.UnaryOperator;
3+
4+
public class Accumulate {
5+
6+
public static <T> List<T> accumulate(List<T> list, UnaryOperator<T> operator) {
7+
throw new UnsupportedOperationException("Please implement the Accumulate.accumulate() method.");
8+
}
9+
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
public class Binary {
2+
3+
public Binary(String input) {
4+
throw new UnsupportedOperationException("Please implement the Binary constructor.");
5+
}
6+
7+
public int getDecimal() {
8+
throw new UnsupportedOperationException("Please implement the Binary.getDecimal() method.");
9+
}
10+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
public class Hexadecimal {
2+
3+
public static int toDecimal(String input) {
4+
throw new UnsupportedOperationException("Please implement the Hexadecimal.toDecimal() method.");
5+
}
6+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
public class Octal {
2+
3+
public Octal(String octal) {
4+
throw new UnsupportedOperationException("Please implement the Octal constructor.");
5+
}
6+
7+
public int getDecimal() {
8+
throw new UnsupportedOperationException("Please implement the Octal.getDecimal() method.");
9+
}
10+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import java.util.Collection;
2+
import java.util.function.Predicate;
3+
4+
public class Strain {
5+
6+
public static <T> Collection<T> keep(Collection<T> collection, Predicate<T> predicate) {
7+
throw new UnsupportedOperationException("Please implement the Strain.keep() method.");
8+
}
9+
10+
public static <T> Collection<T> discard(Collection<T> collection, Predicate<T> predicate) {
11+
throw new UnsupportedOperationException("Please implement the Strain.discard() method.");
12+
}
13+
14+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
public class Trinary {
2+
3+
public static int toDecimal(String input) {
4+
throw new UnsupportedOperationException("Please implement the Trinary.toDecimal() method.");
5+
}
6+
}

0 commit comments

Comments
 (0)