class URL {

    @Override
    public boolean equals(Object object) {
        if (object == null) {
            return false;
        }
        if (object instanceof URL) {
            URL otherURL = (URL)object;
            String otherURLString = otherURL.toString();
            return this.toString().equals(otherURLString);
        } else if (object instanceof String) {
            String otherURLString = (String)object;
            return this.toString().equals(otherURLString);
        } else {
            return false;
        }
    }

    public  URL();

}