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

com.arm.mbed.cloud.sdk.internal.CollectionFormats Maven / Gradle / Ivy

Go to download

The Mbed Cloud SDK provides a simplified interface to the Mbed Cloud APIs by exposing functionality using conventions and paradigms familiar to Java developers.

There is a newer version: 2.2.1
Show newest version
package com.arm.mbed.cloud.sdk.internal;

import java.util.Arrays;
import java.util.List;

public class CollectionFormats {

    public static class CSVParams {

        protected List params;

        public CSVParams() {
        }

        public CSVParams(List params) {
            this.params = params;
        }

        public CSVParams(String... params) {
            this.params = Arrays.asList(params);
        }

        public List getParams() {
            return params;
        }

        public void setParams(List params) {
            this.params = params;
        }

        @Override
        public String toString() {
            return StringUtil.join(params.toArray(new String[0]), ",");
        }

    }

    public static class SSVParams extends CSVParams {

        public SSVParams() {
        }

        public SSVParams(List params) {
            super(params);
        }

        public SSVParams(String... params) {
            super(params);
        }

        @Override
        public String toString() {
            return StringUtil.join(params.toArray(new String[0]), " ");
        }
    }

    public static class TSVParams extends CSVParams {

        public TSVParams() {
        }

        public TSVParams(List params) {
            super(params);
        }

        public TSVParams(String... params) {
            super(params);
        }

        @Override
        public String toString() {
            return StringUtil.join( params.toArray(new String[0]), "\t");
        }
    }

    public static class PIPESParams extends CSVParams {

        public PIPESParams() {
        }

        public PIPESParams(List params) {
            super(params);
        }

        public PIPESParams(String... params) {
            super(params);
        }

        @Override
        public String toString() {
            return StringUtil.join(params.toArray(new String[0]), "|");
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy