Package com.example.airplanned.model
Class Comment
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<Comment>
-
- com.example.airplanned.model.Comment
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Comment>
,Collection<Comment>
,List<Comment>
,RandomAccess
public class Comment extends ArrayList<Comment>
comment class is a part of a post tracks which user commented and what the message was- Author:
- Saiyara Iftekharuzzaman
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description User
getCommenter()
gets the user object associated with the commentString
getMessage()
gets the message from the commentString
printableComment()
takes comment object and makes it easily displayable by converting to stringsvoid
setCommenter(User commenter)
sets the User of the commentvoid
setMessage(String message)
replaces the current message with message passed through-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.List
containsAll
-
-
-
-
Method Detail
-
getMessage
public String getMessage()
gets the message from the comment- Returns:
- String message
-
setMessage
public void setMessage(String message)
replaces the current message with message passed through- Parameters:
message
- String message
-
getCommenter
public User getCommenter()
gets the user object associated with the comment- Returns:
- User
-
setCommenter
public void setCommenter(User commenter)
sets the User of the comment- Parameters:
commenter
- User object of which user commented
-
printableComment
public String printableComment()
takes comment object and makes it easily displayable by converting to strings- Returns:
- string of info from the object
-
-