-
Notifications
You must be signed in to change notification settings - Fork 10
Functional Programming with lambda in Java 8
Here are some very good tutorials and a simple sample: https://leanpub.com/whatsnewinjava8/read Understanding Java 8 Stream Performance from Maurice Naftalin When to use parallel streams and Java Doc Extra features supported by AbacusUtil:
Stream is supported for primitive type except boolean: CharStream, ByteStream, ShortStream, IntStream, LongStream, FloatStream, DoubleStream and Stream. More convenient APIs are provided by: Collectors and Stream Integrated with different data structures: DataSet, Multimap, Multiset and primitive list. Faster Java8 stream implementation for array/collection. Here is the performance test result: stream_performance_test_result.txt by below code:
With the support of Lambda/Stream and DataSet, AbacusUtil provides a set of VERY POWERFUL APIs to process/analyze data.
Stream.of("abc", "123", "ab123").filter(str -> str.startsWith("a")).forEach(N::println);
// abc
// ab123
List<String> strs = N.asList("Hello Java", "I LIKE Functional Programming");
// average length of words in the strings.
Stream.of(strs).flatMap2(str -> str.split(" ")).collect(Collectors.averagingDouble(str -> str.length()));
// 5.833333333333333
// count the characters in upper case.
Stream.of(strs).flatMapToChar(str -> Stream.from(str.toCharArray())).filter(ch -> Character.isUpperCase(ch)).count();
// 9
- How to Learn/Use the APIs correctly and efficiently
- Programming in RDBMS with Jdbc/PreparedQuery/SQLExecutor/Mapper/Dao
- JSON/XML Parser
- SQLite Executor
- SQL Executor
- SQL Builder
- SQL Mapper
- DataSet
- JdbcUtil/CSVUtil
- IOUtil
- PrimitiveList
- Profiler
- Http Client
- Web Services
- Programming in Android
- Parse/Analyze/Operate (Big) Data (on N servers in parallel)
- Code Generation
- Introduction to JDBC
- Naming Convention
- Partitioning/Distribution
- SQL/NoSQL
- Model/Entity