//TODO 解説
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 raystark.eflib.function.notnull.composer; | |
import org.jetbrains.annotations.NotNull; | |
import raystark.eflib.function.notnull.NF1; | |
import raystark.eflib.util.OneShotState; | |
import java.util.Deque; | |
import java.util.LinkedList; | |
public final class ComposerNF1<T1, R> { |
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
public class TypesafeBinaryVisitorSample { | |
public static abstract class Type implements Acceptor { | |
private Type(){} | |
public static final class Type1 extends Type { | |
@Override | |
public <R> R accept(Visitor1<R> visitor1) { | |
return visitor1.visit(this); | |
} | |
} |
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
public class PhantomBuilderSample { | |
public static class Data { | |
private final int field1; | |
private final int field2; | |
private final int field3; | |
private final int optField1; | |
private final int optField2; | |
private Data(Builder<OK, OK, OK> builder) { |
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.UnaryOperator; | |
public class GenericMethodReferenceIssueSample { | |
static <T> T genericMethod(T t) { | |
return t; | |
} | |
static <T> UnaryOperator<T> of(UnaryOperator<T> t) { | |
return t; | |
} |
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.Consumer; | |
public class MethodResolveIssueSample { | |
static class NonGenericClass { | |
static <T> void f() { | |
h(NonGenericClass::<T>methodToBeReferenced); | |
} | |
static <T> void methodToBeReferenced(T t1) {} | |
} |
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 raystark.eflib.exhandler.Try2; | |
public class SampleTry2 { | |
//チェック例外型 | |
static class LargerThan10Exception extends Exception {} | |
static class LargerThan20Exception extends Exception {} | |
static class MiddleException extends Exception {} | |
//可変データ | |
private static int value; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<!-- This module was also published with a richer model, Gradle metadata, --> | |
<!-- which should be used instead. Do not delete the following line which --> | |
<!-- is to indicate to Gradle or any Gradle module metadata file consumer --> | |
<!-- that they should prefer consuming it instead. --> | |
<!-- do_not_remove: published-with-gradle-metadata --> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>raystark.eflib</groupId> |
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 raystark.fizzbuzz.FizzBuzzRule; | |
import raystark.fizzbuzz.FizzBuzzer; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.stream.IntStream; | |
import static java.util.stream.Collectors.toList; | |
/** |
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
public static void main(String[] args) { | |
Function<?, ?> f = Function.identity(); | |
Object obj = new Object(); | |
// これは出来ない | |
// f.apply((?)obj); | |
//これは出来る | |
Object obj2 = captureMethod(f, obj); |
NewerOlder