Package scheduler.model
Class Contact
- java.lang.Object
-
- scheduler.model.Contact
-
public class Contact extends java.lang.ObjectClass to manage a contact object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intContactID(package private) java.lang.StringContactName
-
Constructor Summary
Constructors Constructor Description Contact(int contactID, java.lang.String contactName)Constructor for a contact
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetContactID()Return Contact IDjava.lang.StringgetContactName()Return Contact NamevoidsetContactID(int contactID)Set contact idvoidsetContactName(java.lang.String contactName)Set the contact namejava.lang.StringtoString()Overrides the .toString() function, so that a String representation of the object can be returned to the UI
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Overrides the .toString() function, so that a String representation of the object can be returned to the UI- Overrides:
toStringin classjava.lang.Object- Returns:
- The name of the contact as a String
-
getContactID
public int getContactID()
Return Contact ID- Returns:
- Integer, contact id
-
setContactID
public void setContactID(int contactID)
Set contact id- Parameters:
contactID- Integer, contact id
-
getContactName
public java.lang.String getContactName()
Return Contact Name- Returns:
- String, Contact Name
-
setContactName
public void setContactName(java.lang.String contactName)
Set the contact name- Parameters:
contactName- String, contact name
-
-