Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Ong {
- private String nome;
- private String descricao;
- private List<Voluntarios> listaVoluntarios = new ArrayList<Voluntarios>();
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime
- * result
- + ((listaVoluntarios == null) ? 0 : listaVoluntarios.hashCode());
- return result;
- }
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- Ong other = (Ong) obj;
- if (listaVoluntarios == null) {
- if (other.listaVoluntarios != null)
- return false;
- } else if (!listaVoluntarios.equals(other.listaVoluntarios))
- return false;
- return true;
- }
- /**
- * @return the nome
- */
- public String getNome() {
- return nome;
- }
- /**
- * @param nome the nome to set
- */
- public void setNome(String nome) {
- this.nome = nome;
- }
- /**
- * @return the descricao
- */
- public String getDescricao() {
- return descricao;
- }
- /**
- * @param descricao the descricao to set
- */
- public void setDescricao(String descricao) {
- this.descricao = descricao;
- }
- /**
- * @return the listaVoluntarios
- */
- public List<Voluntarios> getListaVoluntarios() {
- return listaVoluntarios;
- }
- /**
- * @param listaVoluntarios the listaVoluntarios to set
- */
- public void setListaVoluntarios(List<Voluntarios> listaVoluntarios) {
- this.listaVoluntarios = listaVoluntarios;
- }
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return "Ong [nome=" + getNome() + ", descricao=" + getDescricao()
- + ", listaVoluntarios=" + getListaVoluntarios() + "]";
- }
- }
Add Comment
Please, Sign In to add comment