package network.thunder.core.communication.objects.messages.impl.message.gossip;

import com.google.common.base.Preconditions;
import network.thunder.core.communication.objects.messages.impl.message.gossip.objects.P2PDataObject;
import network.thunder.core.communication.objects.messages.interfaces.message.gossip.Gossip;

import java.util.List;

/**
 * Created by matsjerratsch on 30/11/2015.
 */
public class GossipSendMessage implements Gossip {
    public List<P2PDataObject> dataObjects;

    public GossipSendMessage (List<P2PDataObject> dataObjects) {
        this.dataObjects = dataObjects;
    }

    @Override
    public void verify () {
        Preconditions.checkNotNull(dataObjects);
    }
}

@@ -207,23 +207,342 @@
 objects.
-P2PData
+ChannelStatusObject;%0Aimport network.thunder.core.communication.objects.messages.impl.message.gossip.objects.P2PDataObject;%0Aimport network.thunder.core.communication.objects.messages.impl.message.gossip.objects.PubkeyChannelObject;%0Aimport network.thunder.core.communication.objects.messages.impl.message.gossip.objects.PubkeyIP
 Object;%0A
@@ -631,24 +631,52 @@
 ip.Gossip;%0A%0A
+import java.util.ArrayList;%0A
 import java.
@@ -810,236 +810,1257 @@
 st%3CP
-2PDataObject%3E dataObjects;%0A%0A    public GossipSendMessage (List%3CP2PDataObject%3E dataObjects) %7B%0A        this.dataObjects = dataObjects;%0A    %7D%0A%0A    @Override%0A    public void verify () %7B%0A        Preconditions.checkNotNull(dataObjects
+ubkeyIPObject%3E pubkeyIPList;%0A    public List%3CPubkeyChannelObject%3E pubkeyChannelList;%0A    public List%3CChannelStatusObject%3E channelStatusList;%0A%0A    public GossipSendMessage (List%3CP2PDataObject%3E dataObjects) %7B%0A        pubkeyIPList = new ArrayList%3C%3E();%0A        pubkeyChannelList = new ArrayList%3C%3E();%0A        channelStatusList = new ArrayList%3C%3E();%0A%0A        for (P2PDataObject obj : dataObjects) %7B%0A            if (obj instanceof PubkeyIPObject) %7B%0A                pubkeyIPList.add((PubkeyIPObject) obj);%0A%0A            %7D else if (obj instanceof PubkeyChannelObject) %7B%0A                pubkeyChannelList.add((PubkeyChannelObject) obj);%0A%0A            %7D else if (obj instanceof ChannelStatusObject) %7B%0A                channelStatusList.add((ChannelStatusObject) obj);%0A%0A            %7D%0A        %7D%0A    %7D%0A%0A    public List%3CP2PDataObject%3E getDataList () %7B%0A        List%3CP2PDataObject%3E dataList = new ArrayList%3C%3E();%0A        dataList.addAll(pubkeyChannelList);%0A        dataList.addAll(pubkeyIPList);%0A        dataList.addAll(channelStatusList);%0A        return dataList;%0A    %7D%0A%0A    @Override%0A    public void verify () %7B%0A        Preconditions.checkNotNull(pubkeyIPList);%0A        Preconditions.checkNotNull(pubkeyChannelList);%0A        Preconditions.checkNotNull(channelStatusList
 );%0A 

Change GossipSendMessage to make GSON happy