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.crossover.trial; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.Objects; | |
| public class Node<T extends Comparable<? super T>> { | |
| T value; | |
| Node<T> left, right; |
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
| /* / \____ _ _ ____ ______ / \ ____ __ _______ | |
| * / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG | |
| * _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io | |
| * /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ Licensed under the Apache License, Version 2.0 | |
| *//* / \____ _ _ ____ ______ / \ ____ __ _______ | |
| * / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG | |
| * _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io | |
| * /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ Licensed under the Apache License, Version 2.0 | |
| */ | |
| package tutorial.webapp |
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
| /* / \____ _ _ ____ ______ / \ ____ __ _______ | |
| * / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG | |
| * _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io | |
| * /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ Licensed under the Apache License, Version 2.0 | |
| *//* / \____ _ _ ____ ______ / \ ____ __ _______ | |
| * / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG | |
| * _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io | |
| * /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ Licensed under the Apache License, Version 2.0 | |
| */ | |
| package tutorial.webapp |
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
| def names = ['Agnes', 'Akos', 'Anna', 'Berend', 'Geza', 'Istvan', 'Karel', 'Lorinc', 'Marta', 'Noemi', 'Orsi', 'Zsofi'].sort() | |
| names = names*.padRight(names*.length().max()) | |
| def draws = (0..<names.size()).toList().sort() { Math.random() } | |
| draws.eachWithIndex { source, target -> assert source != target } | |
| def linkBase = 'https://www.google.ro/search?q=' | |
| def encode = { "%${Integer.toHexString(it).toUpperCase()}" } | |
| def encodedNames = names[draws]*.bytes*.collect(encode)*.join() |
NewerOlder