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
public interface Animal<ID extends KeyOfAllBeings> extends Identifiable<KeyOfAllBeings> { | |
@Override | |
ID getKey(); | |
void setKey(ID item); | |
} |
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 java.util.List; | |
public class Main { | |
public static void main(String[] args) { | |
Foo foo = new Foo(); | |
// Why does the compiler complain about an unchecked assignment, because foo is raw? | |
List<Integer> numbers = foo.getNumbers(); | |
} |
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 java.util.ArrayList; | |
import java.util.List; | |
public class VehicleMapperImpl implements VehicleMapper { | |
@Override | |
public VehicleDto map(Vehicle in) { | |
if ( in == null ) { | |
return null; | |
} |
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 cma.sandox; | |
import com.google.common.reflect.TypeResolver; | |
import org.assertj.core.api.WithAssertions; | |
import org.junit.Test; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.ParameterizedType; | |
import java.lang.reflect.Type; | |
import java.util.Arrays; |
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
public class Address { | |
private String street; | |
public String getStreet() { | |
return street; | |
} | |
public void setStreet(String street) { | |
this.street = street; |