@@ -0,0 +1,1403 @@
+package phys2d.collisionLogic.tools;%0A%0Aimport phys2d.entities.shapes.Shape;%0A%0A/**%0A * A small class to hold 2 pairs of shapes that have been checked for collision. %3Cbr%3E%0A * Is more or less being used so that it's hashing can be used to make the the%0A * check that prevents redundant collision checks, quicker.%0A * %0A * @author Afsheen%0A *%0A */%0Apublic class CollisionPairs %7B%0A%0A    private Shape s1, s2;%0A%0A    public CollisionPairs(Shape s1, Shape s2) %7B%0A        this.s1 = s1;%0A        this.s2 = s2;%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        final int prime = 31;%0A        int result = 1;%0A        result = prime%0A                * (result + ((s1 == null) ? 0 : s1.hashCode()) + ((s2 == null) ? 0%0A                        : s2.hashCode()));%0A        return result;%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object obj) %7B%0A        if (this == obj)%0A            return true;%0A        if (obj == null)%0A            return false;%0A        if (getClass() != obj.getClass())%0A            return false;%0A        CollisionPairs other = (CollisionPairs) obj;%0A        if (s1 == null) %7B%0A            if (other.s1 != null)%0A                return false;%0A        %7D%0A        else if (!s1.equals(other.s1))%0A            return false;%0A        if (s2 == null) %7B%0A            if (other.s2 != null)%0A                return false;%0A        %7D%0A        else if (!s2.equals(other.s2))%0A            return false;%0A        return true;%0A    %7D%0A%0A%7D%0A

Create new class to make Speculative2 more effecient