Package jadex.bdi.testcases.misc
Class Person
- java.lang.Object
-
- jadex.bdi.testcases.misc.Person
-
public class Person extends java.lang.Object
Simple person class with a name and an address.
-
-
Constructor Summary
Constructors Constructor Description Person(java.lang.String name, java.lang.String address)
Create a new person.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Test if two persons are equal.java.lang.String
getAddress()
Get the address.java.lang.String
getName()
Get the name.int
hashCode()
Calculate the hashcode.void
setAddress(java.lang.String address)
Set the address.void
setName(java.lang.String name)
Set the name.java.lang.String
toString()
Get the string representation.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the name.- Returns:
- The name.
-
setName
public void setName(java.lang.String name)
Set the name.- Parameters:
name
- The name.
-
getAddress
public java.lang.String getAddress()
Get the address.- Returns:
- The address.
-
setAddress
public void setAddress(java.lang.String address)
Set the address.- Parameters:
address
- The address.
-
equals
public boolean equals(java.lang.Object o)
Test if two persons are equal.- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
-- Returns:
- True if the object is an equal person.
-
hashCode
public int hashCode()
Calculate the hashcode.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- The hashcode.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The string representation.
-
-