This file contains hidden or 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 java.util.function.Supplier; | |
| class A { | |
| static int staticSupplier() { return 5; } | |
| int instanceSupplier() { return 10; } | |
| static void printOut(Supplier<Integer> supplier) { | |
| System.out.println(supplier.get()); | |
| } |
This file contains hidden or 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.wix.accord.examples | |
| class Stateful(allowedNames: Set[String]) { | |
| import com.wix.accord.dsl._ | |
| import com.wix.accord._ | |
| private implicit val classroomValidator = validator[Classroom] { c => | |
| c.teacher.name is in(allowedNames) | |
| c.students.map(_.name).each is in(allowedNames) |
OlderNewer