Package scheduler.model
Class Contact
- java.lang.Object
-
- scheduler.model.Contact
-
public class Contact extends java.lang.Object
Class to manage a contact object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
ContactID
(package private) java.lang.String
ContactName
-
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 int
getContactID()
Return Contact IDjava.lang.String
getContactName()
Return Contact Namevoid
setContactID(int contactID)
Set contact idvoid
setContactName(java.lang.String contactName)
Set the contact namejava.lang.String
toString()
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:
toString
in 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
-
-