LEADER 06517nam 22006855 450 001 9910300656603321 005 20200705010551.0 010 $a1-4302-5999-X 024 7 $a10.1007/978-1-4302-5999-2 035 $a(CKB)3710000000375196 035 $a(EBL)1998730 035 $a(SSID)ssj0001465575 035 $a(PQKBManifestationID)11859791 035 $a(PQKBTitleCode)TC0001465575 035 $a(PQKBWorkID)11471879 035 $a(PQKB)10330168 035 $a(DE-He213)978-1-4302-5999-2 035 $a(MiAaPQ)EBC1998730 035 $a(CaSebORM)9781430259992 035 $a(PPN)184887240 035 $a(OCoLC)907397799 035 $a(OCoLC)ocn907397799 035 $a(EXLCZ)993710000000375196 100 $a20150309d2015 u| 0 101 0 $aeng 135 $aur|n|---||||| 181 $ctxt 182 $cc 183 $acr 200 10$aJava Closures and Lambda /$fby Robert Fischer 205 $a1st ed. 2015. 210 1$aBerkeley, CA :$cApress :$cImprint: Apress,$d2015. 215 $a1 online resource (207 p.) 225 1 $aExpert's voice in Java 300 $aIncludes index. 311 $a1-4302-5998-1 327 $aContents at a Glance; Introduction; Chapter 1: Java 8: It's a Whole New Java; Java 8 Returns Java to the Forefront; Java Has Had Functional Programming All Along; Java 8 Is Not Just Syntactic Sugar; Is Java 8 a Functional Programming Language?; Enough with the Theory; onto the Implementation!; Chapter 2: Understanding Lambdas in Java 8; Java 8's Lambda Syntax; Lambdas as Closures; No-Argument and Multi-Argument Lambdas; Partial Function Application and Mr. Curry's Verb; Mr. Curry's Verb and Functional Shape; Lambdas with No Return Value; Lambdas with Complex Bodies 327 $aLambdas with Explicit TypingLambdas as Operators; Lambdas as Predicates; Lambdas with Primitive Arguments; Making Methods into Lambdas; Making Static Methods into Lambdas; Making Constructors into Lambdas; Making Instance Methods into Lambdas; Specifying a Method to Be Used Later; Lambdas as Interface Implementations; Def ault Methods; Static Methods; Functional Interface Helper Methods; Function.identity() and UnaryOperator.identity(); Function.compose and Function.andThen; Consumer.andThen; Predicate.and and Predicate.or; Predicate.isEqual; Predicate.negate 327 $aBinaryOperator. minBy and BinaryOperator. maxByLambda Best Practices; Use Interfaces; Use Method References; Define Lambdas Inline; Lambdas Should Always Be Threadsafe; Don't Use Null; Don't R elease Zalgo; Build Complexity from Simple Parts; Use Types and the Compiler to Your Advantage; Chapter 3: Lambda's Domain: Collections, Maps, and Streams; Lambdas and Functional Programming; Functional Iteration; Manipulating Collections and Maps with Lambdas; Filtering Collections and Maps; Mapping Collections and Maps; Map Computations; Streams; Stream Creation; Mapping and Filtering Streams 327 $aCollecting, Processing, or Reducing StreamsPrimitive Streams; Lambda's Domain in Review; Chapter 4: I/O with Lambdas; Temporary Files and the Hole in the Middle; Exception Handling via Input: Passing in an Exception Handler; Exception Handling via Output: Capturing Execution Results; Consuming Our Temp File Function; Reading All the Lines of Files in a Directory; Complex Stream Processing Using Creative Flattening; Streaming all the Lines of all the Files in a Directory; Summary; Chapter 5: Data Access with Lambdas; Representing the Intermediary Query Results; Printing Out the Results 327 $aMapping the ResultSet to a StreamMethod One: Building a Stream Using the Stream Builder; Method Two: Building a Stream Using Stream.of and Stream.flatMap; Mapping the ResultSet with Result-Based Error Handling; Method Three: Building a Stream Using an AbstractSpliterator; Method Four: Building a Stream from an Iterator; Pulling It All Together; Chapter 6: Lambda Concurrency; Lambdas and Classic Java Threading; Lambdas and Executors; Lambdas and the ThreadPoolExecutor; Lambdas and Fork/Join; Stream Parallelism; Conclusion; Chapter 7: Lambdas and Legacy Code; Resources and Exceptions 327 $aHandling Resources by Throwing an Unchecked Exception 330 $aJava Closures and Lambda introduces you to significant new changes to the Java language coming out of what is termed Project Lambda. These new changes make their debut in Java 8, and their highlight is the long-awaited support for lambda expressions in the Java language. You?ll learn to write lambda expressions and use them to create functional interfaces and default methods for evolving APIs, among many other uses. The changes in Java 8 are significant. Syntax and usage of the language are changed considerably with the introduction of closures and lambda expressions. This book takes you through these important changes from introduction to mastery. Through a set of clear examples, you?ll learn to refactor existing code to take advantage of the new language features. You?ll learn what those features can do for you, and when they are best applied. You?ll learn to design and write new code having these important new features in mind from the very beginning. Clearly explains the fantastic benefits resulting from Project Lambda Explains the syntax and IDE support for the new features Shows how to streamline your code by bringing some of the benefits of functional programming to the Java language Illustrates parallelism in closures through Stream and Spliterator objects Explains API evolution by adding methods to existing interfaces without breaking existing interface implementations, a technique addressing potential multiple inheritance issues. 410 0$aExpert's voice in Java. 606 $aJava (Computer program language) 606 $aSoftware engineering 606 $aJava$3https://scigraph.springernature.com/ontologies/product-market-codes/I29070 606 $aSoftware Engineering/Programming and Operating Systems$3https://scigraph.springernature.com/ontologies/product-market-codes/I14002 615 0$aJava (Computer program language). 615 0$aSoftware engineering. 615 14$aJava. 615 24$aSoftware Engineering/Programming and Operating Systems. 676 $a005.13/3 700 $aFischer$b Robert$4aut$4http://id.loc.gov/vocabulary/relators/aut$0277122 801 0$bUMI 801 1$bUMI 906 $aBOOK 912 $a9910300656603321 996 $aJava Closures and Lambda$91963822 997 $aUNINA