Formatted Chat file
Formatted Getters and Setters
This commit is contained in:
parent
ce3d69c6b0
commit
4022e227ca
@ -18,41 +18,23 @@ public class Chat {
|
||||
messageList = new ArrayList<Message>();
|
||||
}
|
||||
|
||||
public void setUserID(long givenUserID) {
|
||||
chatPartnerID = givenUserID;
|
||||
}
|
||||
public void setUserID(long givenUserID) { chatPartnerID = givenUserID;}
|
||||
|
||||
public long getUserID() {
|
||||
return chatPartnerID;
|
||||
}
|
||||
public long getUserID() { return chatPartnerID;}
|
||||
|
||||
public int getSize() {
|
||||
return chatModel.getSize();
|
||||
}
|
||||
public int getSize() { return chatModel.getSize();}
|
||||
|
||||
public void addMessage(String message) {
|
||||
chatModel.addElement(message);
|
||||
}
|
||||
public void addMessage(String message) { chatModel.addElement(message);}
|
||||
|
||||
public String getMessageAt(int index) {
|
||||
return (String) chatModel.getElementAt(index);
|
||||
}
|
||||
public String getMessageAt(int index) { return (String) chatModel.getElementAt(index);}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public DefaultListModel<String> getModel() {
|
||||
return chatModel;
|
||||
}
|
||||
public DefaultListModel<String> getModel() { return chatModel;}
|
||||
|
||||
public int getListSize() {
|
||||
return messageList.size();
|
||||
}
|
||||
public int getListSize() { return messageList.size();}
|
||||
|
||||
public void addMessageElement(Message message) {
|
||||
messageList.add(message);
|
||||
}
|
||||
public void addMessageElement(Message message) { messageList.add(message);}
|
||||
|
||||
public Message getMessageElement(int index) {
|
||||
return messageList.get(index);
|
||||
}
|
||||
public Message getMessageElement(int index) { return messageList.get(index);}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user