/** * Method equals * * @param other */ public boolean equals(Object other) { if ( this == other) { return true; } if ( !(other instanceof Individual) ) { return false; } Individual that = (Individual) other; boolean result = true; result = result && ( getEmail() == null ? that.getEmail() == null : getEmail().equals( that.getEmail() ) ); return result; } //-- boolean equals(Object)
/** * Method toString */ public java.lang.String toString() { StringBuffer buf = new StringBuffer(); buf.append( "email = '" ); buf.append( getEmail() + "'" ); return buf.toString(); } //-- java.lang.String toString()
public static List cloneIndividuals( List individuals ) { if ( individuals == null ) { return individuals; } List ret = new ArrayList(); Iterator it = individuals.iterator(); while ( it.hasNext() ) { Individual individual = (Individual) it.next(); Individual cloned = new Individual(); cloned.setPrincipal( individual.getPrincipal() ); cloned.setEmail( individual.getEmail() ); cloned.setName( individual.getName() ); cloned.setOrganization( individual.getOrganization() ); cloned.setOrganizationUrl( individual.getOrganizationUrl() ); cloned.setUrl( individual.getUrl() ); cloned.setTimezone( individual.getTimezone() ); cloned.setRoles( cloneRoles( individual.getRoles() ) ); cloned.setProperties( clone( individual.getProperties() ) ); ret.add( cloned ); } return ret; }