This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.whatever | |
{ | |
import org.flexunit.asserts.assertEquals; | |
import org.granite.math.BigDecimal; | |
public class BigDecimalTest { | |
public function BigDecimalTest() { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package mmind; | |
import com.google.common.collect.AbstractIterator; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
public class Mmind { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.base.Function; | |
import com.google.common.base.Optional; | |
import org.junit.Test; | |
import javax.annotation.Nullable; | |
import static org.fest.assertions.Assertions.assertThat; | |
public class OptionalTest { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package collect; | |
import com.google.common.base.Function; | |
public abstract class Option<T> { | |
private static final Option<?> ABSENT = new Absent<Object>(); | |
public static <T> Option<T> of(T value) { | |
return new Present<T>(value); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.mixin; | |
import java.util.Map; | |
import java.util.WeakHashMap; | |
import static java.util.Collections.synchronizedMap; | |
public class MixinMain { | |
interface WithName { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.conway | |
import me.conway.cell.{Cells, Location} | |
import org.scalatest.{Matchers, FunSuiteLike} | |
import scala.language.implicitConversions | |
class CellsTest extends FunSuiteLike with Matchers { | |
implicit def tuple2Location(t: (Int, Int)): Location = Location(t._1, t._2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package my.util; | |
import java.util.Collections; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.NoSuchElementException; | |
import java.util.function.Function; | |
public abstract class Option<T> implements Iterable<T> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object App { | |
val banks: Map[String, Set[Account]] = Map( | |
"BGP" -> Set( | |
Account("CC1", "BGP", "Alice", 5000) | |
), | |
"La Postale" -> Set( | |
Account("CP1", "La Postale", "Alice", 2000) | |
), | |
"Societe Geniale" -> Set(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.sun.net.httpserver.HttpExchange; | |
import com.sun.net.httpserver.HttpServer; | |
import java.io.IOException; | |
import java.net.InetSocketAddress; | |
public class WebMain { | |
public static void main(String[] args) throws IOException { | |
WebServer.serve(8080, "/").withRoute( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test.kata_digit; | |
import static org.fest.assertions.api.Assertions.assertThat; | |
import org.junit.Test; | |
public class DigitTest { | |
@Test | |
public void should_get_digital_one_when_1() throws Exception { |