Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
src/com/ai/learning
.classpath
.gitignore
.project
LICENSE
LearnSparkJava8.iml
readme.md

readme.md

Introduction/Goal

  1. To exercise and learn Jdk 8, Spark, RxJava
  2. Learn using sample code

Generics

com.ai.learning.generics.example1 demonstrates

You can find this package here

The main driver class you want to see for this is here

  1. Design a generic GenericPair class with two input types
  2. See what methods can be used on generic type instance variables
  3. Implement a toString() method in a generic way
  4. Test a string pair
  5. Test an <string, int> pair
  6. Test basic generic methods for <?> and <object>
  7. Test static variables
  8. Test raw type casting of generics
  9. Test simpler (non-paranoid) syntax for geneic instantiation
  10. Test <? extends Base> approach for collections of derived classes
  11. Realize you cannot use ? outside of a <?> .
  12. To provide generic adds on a list, exercise generic methods
  13. Examine instanceof generic types
  14. Examine casting of generic types

Lambda Functions

com.ai.learning.lambda.example1 demonstrates: Lambda Function Basics

You can find this package here

The main driver class you want to see for this is here

  1. Instantiated interfaces as lambda functions. (Single method interfaces)
  2. Parameters to lambda functions
  3. Passing around lambda functions
  4. Default methods
  5. Static values in interfaces
  6. Basic syntax of Lambda functions
  7. Scope of lambda functions
  8. Target typing and type inference
  9. Avoiding types and parenthesis
  10. Gentle introduction to a supplier

com.ai.learning.lambda.example2 demonstrates: Method References

You can find this package here

The main driver class you want to see for this is here

  1. This is an exercise in method references
  2. Use arrays to sort using lambda comparators
  3. Use lists to sort using lambda comparators
  4. Use inline lambda functions
  5. Use static method reference (Type::staticMethod)
  6. Use instance method reference (uses self as one of the arguments. Type::instMethd)
  7. Use arbitrary object instance method reference (objectRef::instUtilityMethod)
  8. Use static methods (Type.staticMethod)
  9. Understand Supplier functional contract
  10. Show how interface default methods are used for before and after (interceptors like) functionality
  11. Show how Type::new method reference is used

Streams

com.ai.learning.streams.example1 demonstrates: Streams Basics

You can find this package here

The main driver class you want to see for this is here

  1. Dip the toe into streams
  2. Pipelines
  3. Source
  4. Intermediate operations/streams
  5. terminal operations
  6. Aggregate operations
  7. Reductions
  8. How to use a collect method with a custom collector
  9. Use Collectors.toList()

Concurrency

com.ai.learning.concurrency.example1

You can find this package here

The main driver class you want to see for this is here

The docs folder for concurrency is here. For now the TOC is kept here.

Directory structure (Guide to Contributors)

  1. /docs/general/readme.md

Key External links

  1. Here is a learning folder for Java 8 and Lambda functions
  2. More external links on Java lambda functions
You can’t perform that action at this time.