Algorithms and OOD (CSC 207 2014F) : Outlines
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [Learning Outcomes] [FAQ] [Teaching & Learning] [Grading] [Rubric] - [Calendar]
Current: [Assignment] [EBoard] [Lab] [Outline] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Readings]
Reference: [Student-Curated Resources] [Java 8 API] [Java 8 Tutorials] [Code Conventions]
Related Courses: [CSC 152 2006S (Rebelsky)] [CSC 207 2014S (Rebelsky)] [CSC 207 2014F (Walker)] [CSC 207 2011S (Weinman)]
Misc: [Submit Questions] - [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] - [Issue Tracker (Course)] [Issue Tracker (Textbook)]
Held: Wednesday, 1 October 2014
Back to Outline 19 - Java Generics. On to Outline 21 - Anonymous Inner Classes.
Summary
We consider the ways in which you build and use anonymous functions in Java (or at least Java 8).
Related Pages
Predicate interface:
http://docs.oracle.com/javase/8/docs/api/java/util/function/Predicate.htmlDocumentation for Function interface:
http://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html
Overview
Administrivia
map often takes a unary function and a list.reduce often takes a binary function and a list.sort often takes a comparator and an array.@FunctionalInterface(PARAMS) -> EXPRESSION(PARAMS) -> { BLOCK }PARAM -> EXPRESSIONPARAM -> { BLOCK }default methods. These methods
are implemented in the interface (thereby changing how we think of
interfaces).
static methods.java.util.function.Predicatejava.util.function.Function