works.chatterbox.hooks.ircchannels.tasks.SaveChannelsTask.java Source code

Java tutorial

Introduction

Here is the source code for works.chatterbox.hooks.ircchannels.tasks.SaveChannelsTask.java

Source

/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package works.chatterbox.hooks.ircchannels.tasks;

import com.google.common.base.Preconditions;
import org.jetbrains.annotations.NotNull;
import works.chatterbox.hooks.ircchannels.IRCChannels;

public class SaveChannelsTask implements Runnable {

    private final IRCChannels ircChannels;

    public SaveChannelsTask(@NotNull final IRCChannels ircChannels) {
        Preconditions.checkNotNull(ircChannels, "ircChannels was null");
        this.ircChannels = ircChannels;
    }

    @Override
    public void run() {
        this.ircChannels.saveIRCChannelsConfig();
    }
}