lunes, 12 de mayo de 2014

Android: Overriding equals

@Override
public boolean equals(Object other){
    if (other == null) return false;
    if (other == this) return true;
    if (!(other instanceof MyClass)) return false;
    MyClass otherMyClass = (MyClass)other;
    // Further testing...
}

No hay comentarios:

Publicar un comentario