Browse Source

Cambiando Cosas

master
Cristobal Bernal Mayordomo 1 year ago
parent
commit
88b71d97c5
1 changed files with 54 additions and 6 deletions
  1. +54
    -6
      src/main/java/com/cristobalbernal/loladvisor/model/Lol.java

+ 54
- 6
src/main/java/com/cristobalbernal/loladvisor/model/Lol.java View File

@ -1,12 +1,14 @@
package com.cristobalbernal.loladvisor.model; package com.cristobalbernal.loladvisor.model;
import java.util.List;
public class Lol { public class Lol {
private long id; private long id;
private String nombre; private String nombre;
private String rol;
private List<String> rol;
private String dificultad; 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.id = id;
this.nombre = nombre; this.nombre = nombre;
this.rol = rol; this.rol = rol;
@ -21,9 +23,7 @@ public class Lol {
return nombre; return nombre;
} }
public String getRol() {
return rol;
}
public String getDificultad() { public String getDificultad() {
return dificultad; return dificultad;
@ -37,11 +37,59 @@ public class Lol {
this.nombre = nombre; this.nombre = nombre;
} }
public void setRol(String rol) {
public List<String> getRol() {
return rol;
}
public void setRol(List<String> rol) {
this.rol = rol; this.rol = rol;
} }
public void setDificultad(String dificultad) { public void setDificultad(String dificultad) {
this.dificultad = 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 + '\'' +
'}';
}
} }

Loading…
Cancel
Save