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

com.activitystream.sdk.utilities.SimpleArrayWrapper Maven / Gradle / Ivy

Go to download

AS-SDK is a java library to allow easy interoperability with Activity Stream.

There is a newer version: 0.1.25
Show newest version
package com.activitystream.sdk.utilities;

public class SimpleArrayWrapper implements ColumnarDataReader {

    private String[] line;

    public SimpleArrayWrapper(String[] line) {
        this.line = line;
    }

    @Override
    public String column(Enum field) {
        return this.line[field.ordinal()];
    }

    public String column(int fieldNr) {
        return this.line[fieldNr];
    }

    public int length() {
        return (line != null) ? line.length : 0;
    }

    @Override
    public String toString() {
        StringBuilder string = new StringBuilder();
        for (String part : line) {
            string.append("|").append(part);
        }
        return string.toString();
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy