CSVObjects Framework

test.net.sf.anupam.csv.beans
Class Designation

java.lang.Object
  extended by test.net.sf.anupam.csv.beans.Designation
All Implemented Interfaces:
Comparable<Designation>

public class Designation
extends Object
implements Comparable<Designation>

Sample bean to represent an employee designation.

Version:
$Revision: 1.2 $
Author:
Anupam Sengupta
CSV Mapping:
Mapped Bean Name: "designationBean"
Has CSV Header: "true"

Constructor Summary
Designation()
          Constructor for Designation.
 
Method Summary
 int compareTo(Designation other)
          Compares this designation to another designation.
 boolean equals(Object other)
          Compares this designation with another for equality.
 String getDesignation()
          Returns value of the designation.
 int hashCode()
          Returns the hash code for this designation.
 void setDesignation(String designation)
          Sets value of the designation.
 String toString()
          Returns the string representation of this designation for debugging purposes only.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Designation

public Designation()
Constructor for Designation.

Method Detail

compareTo

public int compareTo(Designation other)
Compares this designation to another designation.

Specified by:
compareTo in interface Comparable<Designation>
Parameters:
other - the other designation to compare against
Returns:
0 if the two designations are equal, -1 if this designation ranks lower, +1 if this designation ranks higher
See Also:
Comparable.compareTo(Object)

toString

public String toString()
Returns the string representation of this designation for debugging purposes only.

Overrides:
toString in class Object
Returns:
the string representation
See Also:
Object.toString()

hashCode

public int hashCode()
Returns the hash code for this designation. The hash code is based on the designation string.

Overrides:
hashCode in class Object
Returns:
the hash code for this designation
See Also:
Object.hashCode()

equals

public boolean equals(Object other)
Compares this designation with another for equality. The equality is based on the designation string.

Overrides:
equals in class Object
Parameters:
other - the other designation to compare against
Returns:
true if the designations are equal, false otherwise
See Also:
Object.equals(Object)

getDesignation

public String getDesignation()
Returns value of the designation.

Returns:
Returns the designation.
CSV Field Mapping:
CSV Field Position: "4"
Reformatter: None

setDesignation

public void setDesignation(String designation)
Sets value of the designation.

Parameters:
designation - The designation to set.

SourceForge.net Logo

© Anupam Sengupta 2005