Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions .idea/Lambdas2-ZCW.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__junit_junit_4_9.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions Lambdas2ZCW/Lambdas2ZCW.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.9" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.github.stefanbirkner:system-rules:1.19.0" level="project" />
</component>
</module>
26 changes: 26 additions & 0 deletions Lambdas2ZCW/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.zipcodewilmington</groupId>
<artifactId>Lambdas2ZCW</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.stefanbirkner</groupId>
<artifactId>system-rules</artifactId>
<version>1.19.0</version>
<scope>test</scope>
</dependency>
</dependencies>


</project>
Binary file added rocks/zipcode/CheckOlderThan40.class
Binary file not shown.
Binary file added rocks/zipcode/CheckPerson.class
Binary file not shown.
Binary file added rocks/zipcode/LocalSearch.class
Binary file not shown.
Binary file added rocks/zipcode/Main$1Under30.class
Binary file not shown.
Binary file added rocks/zipcode/Main.class
Binary file not shown.
Binary file added rocks/zipcode/Person$Sex.class
Binary file not shown.
Binary file added rocks/zipcode/Person.class
Binary file not shown.
Binary file added rocks/zipcode/PersonTest.class
Binary file not shown.
Binary file added rocks/zipcode/Searches.class
Binary file not shown.
Binary file added rocks/zipcode/SearchesTest$1Under30.class
Binary file not shown.
Binary file added rocks/zipcode/SearchesTest.class
Binary file not shown.
Binary file added rocks/zipcode/SocialNetworks.class
Binary file not shown.
Binary file added rocks/zipcode/SocialNetworksTest.class
Binary file not shown.
13 changes: 13 additions & 0 deletions src/main/java/rocks/zipcode/CheckOlderThan40.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package rocks.zipcode;

public class CheckOlderThan40 implements CheckPerson {

@Override
public boolean test(Person person) {
if (person.getAge() >= 40) {
return true;
}
return false;
}

}
6 changes: 6 additions & 0 deletions src/main/java/rocks/zipcode/CheckPerson.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package rocks.zipcode;

public interface CheckPerson {

boolean test (Person person);
}
21 changes: 21 additions & 0 deletions src/main/java/rocks/zipcode/LocalSearch.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package rocks.zipcode;

import java.util.List;

public class LocalSearch implements CheckPerson{
public static void printPersons(List<Person> roster, CheckPerson tester) {
for (Person p : roster) {
if (tester.test(p)) {
p.printPerson();
}
}
}

@Override
public boolean test(Person person) {
return person.gender == Person.Sex.FEMALE &&
person.getAge() >= 0 &&
person.getAge() <= 80;

}
}
Loading