Package com.example.server.lastmessages
Interface LastMessages
- All Known Implementing Classes:
CircularFifoBufferLastMessages
public interface LastMessages
The LastMessages interface represents a collection of last messages in a chat application.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new message to the collection of last messages.void
clear()
Clears all the last messages from the collection.Returns a collection of the last messages.
-
Method Details
-
clear
void clear()Clears all the last messages from the collection. -
add
Adds a new message to the collection of last messages.- Parameters:
message
- The message to be added.
-
getLastMessages
Collection<String> getLastMessages()Returns a collection of the last messages.- Returns:
- The collection of last messages.
-