FileDocCategorySizeDatePackage
PoliticalCandidate.javaAPI DocExample4094Wed May 18 09:39:00 BST 2005com.discursive.jccook.lang.builders

PoliticalCandidate

public class PoliticalCandidate extends Object implements Comparable

Fields Summary
private String
lastName
private String
firstName
private Date
dateOfBirth
private BigDecimal
moneyRaised
private State
state
Constructors Summary
public PoliticalCandidate()

public PoliticalCandidate(String lastName, String firstName, Date dateOfBirth, BigDecimal moneyRaised, State state)

		this.lastName = lastName;
		this.firstName = firstName;
		this.dateOfBirth = dateOfBirth;
		this.moneyRaised = moneyRaised;
		this.state = state;
	
Methods Summary
public intcompareTo(java.lang.Object o)

        int compare = -1; // By default return less-than
        if( o != null && 
            PoliticalCandidate.class.isAssignableFrom( o.getClass() ) ) {
                PoliticalCandidate pc = (PoliticalCandidate) o;
                compare = (new CompareToBuilder()
                              .append(firstName, pc.firstName)
                              .append(lastName, pc.lastName)).toComparison();
        }
        return compare;
    
public java.util.DategetDateOfBirth()

 return dateOfBirth; 
public java.lang.StringgetFirstName()

 return firstName; 
public java.lang.StringgetLastName()

 return lastName; 
public java.math.BigDecimalgetMoneyRaised()

 return moneyRaised; 
public StategetState()

 return state; 
public voidsetDateOfBirth(java.util.Date dateOfBirth)

		this.dateOfBirth = dateOfBirth;
	
public voidsetFirstName(java.lang.String firstName)

		this.firstName = firstName;
	
public voidsetLastName(java.lang.String lastName)

		this.lastName = lastName;
	
public voidsetMoneyRaised(java.math.BigDecimal moneyRaised)

		this.moneyRaised = moneyRaised;
	
public voidsetState(State state)

		this.state = state;
	
public java.lang.StringtoString()

    	return new ToStringBuilder(this, ToStringStyle.SIMPLE_STYLE)
					.append( "lastName", lastName )
					.append( "firstName", firstName )
					.toString();