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
trait Bindable { | |
def label: String | |
} | |
case class Port(label: String) extends Bindable | |
case class Net(label: String) extends Bindable | |
case class Binding(from: Bindable, to: Bindable){ | |
override def toString: String = s"$from -> $to" | |
} |
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 com.github.benmanes.caffeine.cache.Caffeine; | |
import org.springframework.cache.caffeine.CaffeineCache; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import static java.time.Duration.ofHours; | |
import static java.time.Duration.ofMinutes; | |
@Configuration | |
public class CacheConfiguration { |
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 pl.jellysoft; | |
import org.junit.Test; | |
import java.util.Arrays; | |
public class MethodReferenceSemanticChangeTest { | |
// final will solve it | |
private BusinessObject businessObject = new BusinessObject(); |
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 pl.jellysoft; | |
public class Main { | |
public static void main(String[] args) { | |
// Create anonymous class | |
new Child() { | |
/* THIS WON'T COMPILE |
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
private <T> Iterable<List<T>> iteratePoints(String dataPointsString, final Transformer<String, T> parser) { | |
final Matcher matcherPoints = PATTERN_POINTS.matcher(dataPointsString); | |
return new Iterable<List<T>>() { | |
@Override | |
public Iterator<List<T>> iterator() { | |
return new Iterator<List<T>>() { | |
@Override | |
public boolean hasNext() { |