|
|
@ -1,12 +1,14 @@ |
|
|
|
package com.cristobalbernal.loladvisor.model; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
public class Lol { |
|
|
|
private long id; |
|
|
|
private String nombre; |
|
|
|
private String rol; |
|
|
|
private List<String> rol; |
|
|
|
private String dificultad; |
|
|
|
|
|
|
|
public Lol(long id, String nombre, String rol, String dificultad) { |
|
|
|
public Lol(long id, String nombre, List<String> rol, String dificultad) { |
|
|
|
this.id = id; |
|
|
|
this.nombre = nombre; |
|
|
|
this.rol = rol; |
|
|
@ -21,9 +23,7 @@ public class Lol { |
|
|
|
return nombre; |
|
|
|
} |
|
|
|
|
|
|
|
public String getRol() { |
|
|
|
return rol; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getDificultad() { |
|
|
|
return dificultad; |
|
|
@ -37,11 +37,59 @@ public class Lol { |
|
|
|
this.nombre = nombre; |
|
|
|
} |
|
|
|
|
|
|
|
public void setRol(String rol) { |
|
|
|
public List<String> getRol() { |
|
|
|
return rol; |
|
|
|
} |
|
|
|
|
|
|
|
public void setRol(List<String> rol) { |
|
|
|
this.rol = rol; |
|
|
|
} |
|
|
|
|
|
|
|
public void setDificultad(String dificultad) { |
|
|
|
this.dificultad = dificultad; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public int hashCode() { |
|
|
|
return super.hashCode(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean equals(Object obj) { |
|
|
|
if (this == obj) |
|
|
|
return true; |
|
|
|
if (obj == null) |
|
|
|
return false; |
|
|
|
if (getClass() != obj.getClass()) |
|
|
|
return false; |
|
|
|
Lol other = (Lol) obj; |
|
|
|
if (dificultad == null) { |
|
|
|
if (other.dificultad != null) |
|
|
|
return false; |
|
|
|
} else if (!dificultad.equals(other.dificultad)) |
|
|
|
return false; |
|
|
|
if (id != other.id) |
|
|
|
return false; |
|
|
|
if (nombre == null) { |
|
|
|
if (other.nombre != null) |
|
|
|
return false; |
|
|
|
} else if (!nombre.equals(other.nombre)) |
|
|
|
return false; |
|
|
|
if (rol == null) { |
|
|
|
if (other.rol != null) |
|
|
|
return false; |
|
|
|
} else if (!rol.equals(other.rol)) |
|
|
|
return false; |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public String toString() { |
|
|
|
return "Lol{" + |
|
|
|
"id=" + id + |
|
|
|
", nombre='" + nombre + '\'' + |
|
|
|
", rol=" + rol + |
|
|
|
", dificultad='" + dificultad + '\'' + |
|
|
|
'}'; |
|
|
|
} |
|
|
|
} |