From 62b45b0590b69c5b0feee63b751c4d15776f70da Mon Sep 17 00:00:00 2001 From: blha303 Date: Sun, 10 Nov 2013 16:55:52 +0800 Subject: Mavenized --- .gitignore | 4 ++ 5728853850_a3bbb14083_z.jpg | Bin 65939 -> 0 bytes lovethepotato.jpg | Bin 73078 -> 0 bytes pom.xml | 31 +++++++++++++++ sourcream.png | Bin 64151 -> 0 bytes src/Potato.java | 53 ------------------------- src/Tuber.java | 3 -- src/main/java/Potato.java | 53 +++++++++++++++++++++++++ src/main/java/Tuber.java | 3 ++ src/main/resources/5728853850_a3bbb14083_z.jpg | Bin 0 -> 65939 bytes src/main/resources/lovethepotato.jpg | Bin 0 -> 73078 bytes src/main/resources/sourcream.png | Bin 0 -> 64151 bytes 12 files changed, 91 insertions(+), 56 deletions(-) create mode 100644 .gitignore delete mode 100644 5728853850_a3bbb14083_z.jpg delete mode 100644 lovethepotato.jpg create mode 100644 pom.xml delete mode 100644 sourcream.png delete mode 100644 src/Potato.java delete mode 100644 src/Tuber.java create mode 100644 src/main/java/Potato.java create mode 100644 src/main/java/Tuber.java create mode 100644 src/main/resources/5728853850_a3bbb14083_z.jpg create mode 100644 src/main/resources/lovethepotato.jpg create mode 100644 src/main/resources/sourcream.png diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..889cb7f --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +target/ +*.class +.classpath +.project \ No newline at end of file diff --git a/5728853850_a3bbb14083_z.jpg b/5728853850_a3bbb14083_z.jpg deleted file mode 100644 index 6791074..0000000 Binary files a/5728853850_a3bbb14083_z.jpg and /dev/null differ diff --git a/lovethepotato.jpg b/lovethepotato.jpg deleted file mode 100644 index 20165e2..0000000 Binary files a/lovethepotato.jpg and /dev/null differ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..436cf7d --- /dev/null +++ b/pom.xml @@ -0,0 +1,31 @@ + + 4.0.0 + drtshock + potato + 1.0 + Potato + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + 1.5 + 1.5 + + + + org.apache.maven.plugins + maven-jar-plugin + 2.1 + + + false + + Potato + + + + + diff --git a/sourcream.png b/sourcream.png deleted file mode 100644 index d00f648..0000000 Binary files a/sourcream.png and /dev/null differ diff --git a/src/Potato.java b/src/Potato.java deleted file mode 100644 index 399cdda..0000000 --- a/src/Potato.java +++ /dev/null @@ -1,53 +0,0 @@ -import java.util.List; -import java.util.ArrayList; - -public class Potato implements Tuber { - - private final List condiments = new ArrayList(); - - public static void main(String[] args) { - Potato potato = new Potato(); - GLaDOS glados = new GLaDOS(); - if (potato.prepare()) System.out.println("Of course potato is prepared and delicious."); - else System.err.println("Fatal error! How could potato not be delicious?"); - } - - public boolean prepare() { - this.addCondiments("sour cream", "chives", "butter"); - return this.isDelicious(); - } - - public void addCondiments(String... names) { - synchronized (condiments) { - for (String condimentName : names) condiments.add(new Condiment(condimentName)); - } - } - - @Override - public boolean isDelicious() { - return true; // obviously, potatos are always delicious - } - - private class Condiment { - private final String name; - - public Condiment(String name) { - this.name = name; - } - - public String getName() { - return this.name; - } - } - - private static class GLaDOS extends Potato { - public GLaDOS() { - System.out.println("Oh hi, how are you holding up? BECAUSE I'M A POTATO... clap clap clap... oh good, my slow clap processor made it into this thing, at least we have that."); - } - - @Override - public boolean isDelicious() { - return false; // robots are not delicious - } - } -} diff --git a/src/Tuber.java b/src/Tuber.java deleted file mode 100644 index ec36f28..0000000 --- a/src/Tuber.java +++ /dev/null @@ -1,3 +0,0 @@ -public interface Tuber { - public boolean isDelicious(); -} diff --git a/src/main/java/Potato.java b/src/main/java/Potato.java new file mode 100644 index 0000000..399cdda --- /dev/null +++ b/src/main/java/Potato.java @@ -0,0 +1,53 @@ +import java.util.List; +import java.util.ArrayList; + +public class Potato implements Tuber { + + private final List condiments = new ArrayList(); + + public static void main(String[] args) { + Potato potato = new Potato(); + GLaDOS glados = new GLaDOS(); + if (potato.prepare()) System.out.println("Of course potato is prepared and delicious."); + else System.err.println("Fatal error! How could potato not be delicious?"); + } + + public boolean prepare() { + this.addCondiments("sour cream", "chives", "butter"); + return this.isDelicious(); + } + + public void addCondiments(String... names) { + synchronized (condiments) { + for (String condimentName : names) condiments.add(new Condiment(condimentName)); + } + } + + @Override + public boolean isDelicious() { + return true; // obviously, potatos are always delicious + } + + private class Condiment { + private final String name; + + public Condiment(String name) { + this.name = name; + } + + public String getName() { + return this.name; + } + } + + private static class GLaDOS extends Potato { + public GLaDOS() { + System.out.println("Oh hi, how are you holding up? BECAUSE I'M A POTATO... clap clap clap... oh good, my slow clap processor made it into this thing, at least we have that."); + } + + @Override + public boolean isDelicious() { + return false; // robots are not delicious + } + } +} diff --git a/src/main/java/Tuber.java b/src/main/java/Tuber.java new file mode 100644 index 0000000..ec36f28 --- /dev/null +++ b/src/main/java/Tuber.java @@ -0,0 +1,3 @@ +public interface Tuber { + public boolean isDelicious(); +} diff --git a/src/main/resources/5728853850_a3bbb14083_z.jpg b/src/main/resources/5728853850_a3bbb14083_z.jpg new file mode 100644 index 0000000..6791074 Binary files /dev/null and b/src/main/resources/5728853850_a3bbb14083_z.jpg differ diff --git a/src/main/resources/lovethepotato.jpg b/src/main/resources/lovethepotato.jpg new file mode 100644 index 0000000..20165e2 Binary files /dev/null and b/src/main/resources/lovethepotato.jpg differ diff --git a/src/main/resources/sourcream.png b/src/main/resources/sourcream.png new file mode 100644 index 0000000..d00f648 Binary files /dev/null and b/src/main/resources/sourcream.png differ -- cgit v1.3