@@ -0,0 +1,2194 @@
+/*%0ACopyright 2014 Glen Peterson%0A%0ALicensed under the Apache License, Version 2.0 (the %22License%22);%0Ayou may not use this file except in compliance with the License.%0AYou may obtain a copy of the License at%0A%0A    http://www.apache.org/licenses/LICENSE-2.0%0A%0AUnless required by applicable law or agreed to in writing, software%0Adistributed under the License is distributed on an %22AS IS%22 BASIS,%0AWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0ASee the License for the specific language governing permissions and%0Alimitations under the License.%0A*/%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0Apublic class SetInterface %7B%0A    static interface Foo %7B%0A        int phooey();%0A    %7D%0A    static class Aye implements Foo %7B%0A        private final int phooey;%0A        public Aye(int p) %7B phooey = p; %7D%0A        @Override public int phooey() %7B return phooey; %7D%0A        @Override public int hashCode() %7B return phooey; %7D%0A        @Override public boolean equals(Object other) %7B%0A            if (this == other) %7B return true; %7D%0A            if ( (other == null) %7C%7C%0A                 !(other instanceof Aye) %7C%7C%0A                 (this.hashCode() != other.hashCode()) ) %7B%0A                return false;%0A            %7D%0A            final Aye that = (Aye) other;%0A            return (this.phooey == that.phooey);%0A        %7D%0A    %7D%0A%0A    static class Boo implements Foo %7B%0A        private final int phooey;%0A        public Boo(int p) %7B phooey = p; %7D%0A        @Override public int phooey() %7B return phooey; %7D%0A        @Override public int hashCode() %7B return phooey; %7D%0A        @Override public boolean equals(Object other) %7B%0A            if (this == other) %7B return true; %7D%0A            if ( (other == null) %7C%7C%0A                 !(other instanceof Boo) %7C%7C%0A                 (this.hashCode() != other.hashCode()) ) %7B%0A                return false;%0A            %7D%0A            final Boo that = (Boo) other;%0A            return (this.phooey == that.phooey);%0A        %7D%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Set%3CFoo%3E fooset = new HashSet%3C%3E();%0A        fooset.add(new Aye(1));%0A        fooset.add(new Boo(1));%0A        for (Foo foo : fooset) %7B%0A            System.out.println(foo.phooey());%0A        %7D%0A    %7D   %0A%7D%0A

Create SetInterface.java