SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Preparation

binaere bauten gmbh • jost becker
Interface
Static methods
public interface Comparator<T> {

public static <T…> Comparator<T> reverseOrder() {
return Collections.reverseOrder();
}
}

binaere bauten gmbh • matthias köster
Virtual extension methods
public interface Iterable<T> {

default void forEach(Consumer<? super T> action) {
Objects.requireNonNull(action);
for (T t : this) {
action.accept(t);
}
}
}

binaere bauten gmbh • matthias köster
SAM interface
public interface Comparable<T> {
public int compareTo(T o);
}

binaere bauten gmbh • matthias köster
Lambda Expression
List<String> names = Arrays.asList("one", "two", "three");

Collections.sort(names,
(String o1, String o2) -> o2.compareTo(o1));

binaere bauten gmbh • matthias köster
Lambda Expression
Variable capture
String prefix ="Hi "; // effectively final
names.forEach(
(String s) -> System.out.println(prefix + s));

prefix = ""; // not effectively final anymore
names.forEach(
(String s) -> System.out.println(prefix + s));

binaere bauten gmbh • matthias köster
Method handles
List<Integer> nums = Arrays.asList(10, 2, 3);
nums.sort(Integer::compareTo);

List<String> names = Arrays.asList("one", "two", "three");
names.forEach(System.out::println);

binaere bauten gmbh • matthias köster
Type inference
List<String> myList = Collections.emptyList();
Collections.sort(myList, (o1, o2) -> o2.compareTo(o1));

binaere bauten gmbh • matthias köster
Stream API
List<String> names = Arrays.asList("one", "two", "three");
int minSize = names.parallelStream().
mapToInt(String::length).reduce(0, Integer::min);
OptionalInt minSize = names.parallelStream().
mapToInt(String::length).min();
Path p = FileSystems.getDefault().
getPath("/tmp/index.html");
Files.lines(p,Charset.forName("UTF-8")).
forEach(System.out::println);
binaere bauten gmbh • matthias köster
JavaFX





binaere bauten gmbh • jost becker
Summary
•
–

•
–
–
–

binaere bauten gmbh • jost becker

Already feels like
Using a decent Scala IDE ;-)
Thanks a lot for your attention!

fin

binaere bauten gmbh • matthias köster

Weitere ähnliche Inhalte

Was ist angesagt?

More multiplication properties of exponents
More multiplication properties of exponents More multiplication properties of exponents
More multiplication properties of exponents
chrystal_brinson
 
Multi dimensional profiling
Multi dimensional profilingMulti dimensional profiling
Multi dimensional profiling
bergel
 
Operations With Functions May 25 2009
Operations With Functions May 25 2009Operations With Functions May 25 2009
Operations With Functions May 25 2009
ingroy
 
2.4 operations on functions
2.4 operations on functions2.4 operations on functions
2.4 operations on functions
hisema01
 

Was ist angesagt? (20)

Basic Calculus in R.
Basic Calculus in R. Basic Calculus in R.
Basic Calculus in R.
 
More multiplication properties of exponents
More multiplication properties of exponents More multiplication properties of exponents
More multiplication properties of exponents
 
imager package in R and examples..
imager package in R and examples..imager package in R and examples..
imager package in R and examples..
 
Composite functions
Composite functionsComposite functions
Composite functions
 
Alg2 lesson 7-7
Alg2 lesson 7-7Alg2 lesson 7-7
Alg2 lesson 7-7
 
Alg2 lesson 7.7
Alg2 lesson 7.7Alg2 lesson 7.7
Alg2 lesson 7.7
 
Lecture 2 f17
Lecture 2 f17Lecture 2 f17
Lecture 2 f17
 
Mi primer map reduce
Mi primer map reduceMi primer map reduce
Mi primer map reduce
 
Mi primer map reduce
Mi primer map reduceMi primer map reduce
Mi primer map reduce
 
Multi dimensional profiling
Multi dimensional profilingMulti dimensional profiling
Multi dimensional profiling
 
Chris hill rps_postgis_threeoutoffouraintbad_20150505_1
Chris hill rps_postgis_threeoutoffouraintbad_20150505_1Chris hill rps_postgis_threeoutoffouraintbad_20150505_1
Chris hill rps_postgis_threeoutoffouraintbad_20150505_1
 
Block Reduction Method
Block Reduction MethodBlock Reduction Method
Block Reduction Method
 
Operations With Functions May 25 2009
Operations With Functions May 25 2009Operations With Functions May 25 2009
Operations With Functions May 25 2009
 
Concurrent Ternary Galois-based Computation using Nano-apex Multiplexing Nibs...
Concurrent Ternary Galois-based Computation using Nano-apex Multiplexing Nibs...Concurrent Ternary Galois-based Computation using Nano-apex Multiplexing Nibs...
Concurrent Ternary Galois-based Computation using Nano-apex Multiplexing Nibs...
 
[Paper Reading] Generalized Sub-Query Fusion for Eliminating Redundant I/O fr...
[Paper Reading] Generalized Sub-Query Fusion for Eliminating Redundant I/O fr...[Paper Reading] Generalized Sub-Query Fusion for Eliminating Redundant I/O fr...
[Paper Reading] Generalized Sub-Query Fusion for Eliminating Redundant I/O fr...
 
Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.
 
Context-Aware Recommender System Based on Boolean Matrix Factorisation
Context-Aware Recommender System Based on Boolean Matrix FactorisationContext-Aware Recommender System Based on Boolean Matrix Factorisation
Context-Aware Recommender System Based on Boolean Matrix Factorisation
 
Excel function
Excel functionExcel function
Excel function
 
2.4 operations on functions
2.4 operations on functions2.4 operations on functions
2.4 operations on functions
 
From Cypher 9 to GQL: Conceptual overview of multiple named graphs and compos...
From Cypher 9 to GQL: Conceptual overview of multiple named graphs and compos...From Cypher 9 to GQL: Conceptual overview of multiple named graphs and compos...
From Cypher 9 to GQL: Conceptual overview of multiple named graphs and compos...
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

Java 8 support in eclipse/JDT

  • 1.
  • 3. Interface Static methods public interface Comparator<T> { public static <T…> Comparator<T> reverseOrder() { return Collections.reverseOrder(); } } binaere bauten gmbh • matthias köster
  • 4. Virtual extension methods public interface Iterable<T> { default void forEach(Consumer<? super T> action) { Objects.requireNonNull(action); for (T t : this) { action.accept(t); } } } binaere bauten gmbh • matthias köster
  • 5. SAM interface public interface Comparable<T> { public int compareTo(T o); } binaere bauten gmbh • matthias köster
  • 6. Lambda Expression List<String> names = Arrays.asList("one", "two", "three"); Collections.sort(names, (String o1, String o2) -> o2.compareTo(o1)); binaere bauten gmbh • matthias köster
  • 7. Lambda Expression Variable capture String prefix ="Hi "; // effectively final names.forEach( (String s) -> System.out.println(prefix + s)); prefix = ""; // not effectively final anymore names.forEach( (String s) -> System.out.println(prefix + s)); binaere bauten gmbh • matthias köster
  • 8. Method handles List<Integer> nums = Arrays.asList(10, 2, 3); nums.sort(Integer::compareTo); List<String> names = Arrays.asList("one", "two", "three"); names.forEach(System.out::println); binaere bauten gmbh • matthias köster
  • 9. Type inference List<String> myList = Collections.emptyList(); Collections.sort(myList, (o1, o2) -> o2.compareTo(o1)); binaere bauten gmbh • matthias köster
  • 10. Stream API List<String> names = Arrays.asList("one", "two", "three"); int minSize = names.parallelStream(). mapToInt(String::length).reduce(0, Integer::min); OptionalInt minSize = names.parallelStream(). mapToInt(String::length).min(); Path p = FileSystems.getDefault(). getPath("/tmp/index.html"); Files.lines(p,Charset.forName("UTF-8")). forEach(System.out::println); binaere bauten gmbh • matthias köster
  • 12. Summary • – • – – – binaere bauten gmbh • jost becker Already feels like Using a decent Scala IDE ;-)
  • 13. Thanks a lot for your attention! fin binaere bauten gmbh • matthias köster