All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.infomaximum.network.struct.info.NetworkInfo Maven / Gradle / Ivy

The newest version!
package com.infomaximum.network.struct.info;

import com.infomaximum.network.transport.Transport;

import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

public class NetworkInfo {

    private final List transportsInfo;

    public NetworkInfo(List transportsInfo) {
        this.transportsInfo = transportsInfo.stream().map(Transport::getInfo).collect(Collectors.toList());
    }

    public List getTransportsInfo() {
        return Collections.unmodifiableList(transportsInfo);
    }

    @Override
    public String toString() {
        return "Network{" +
                "transports=" + transportsInfo +
                '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy