Use Optional from java.util, not Guava
[xudocci.git] / src / main / java / net / pterodactylus / irc / event / ChannelLeft.java
index e9c52f3..3d99a7f 100644 (file)
@@ -17,6 +17,8 @@
 
 package net.pterodactylus.irc.event;
 
+import java.util.Optional;
+
 import net.pterodactylus.irc.Connection;
 import net.pterodactylus.irc.Source;
 
@@ -31,7 +33,7 @@ public class ChannelLeft extends AbstractChannelEvent {
        private final Source client;
 
        /** The message given by the client. */
-       private final String message;
+       private final Optional<String> message;
 
        /**
         * Creates a new channel joined event.
@@ -43,7 +45,7 @@ public class ChannelLeft extends AbstractChannelEvent {
         * @param message
         *              The message given by the client
         */
-       public ChannelLeft(Connection connection, String channel, Source client, String message) {
+       public ChannelLeft(Connection connection, String channel, Source client, Optional<String> message) {
                super(connection, channel);
                this.client = client;
                this.message = message;
@@ -67,7 +69,7 @@ public class ChannelLeft extends AbstractChannelEvent {
         *
         * @return The message given by the client
         */
-       public String message() {
+       public Optional<String> message() {
                return message;
        }