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

com.cognitect.transit.impl.ListBuilderImpl Maven / Gradle / Ivy

Go to download

Transit is a data format and a set of libraries for conveying values between applications written in different languages. This library provides support for marshalling Transit data to/from Java.

There is a newer version: 1.0.371
Show newest version
// Copyright (c) Cognitect, Inc.
// All rights reserved.

package com.cognitect.transit.impl;

import com.cognitect.transit.ArrayReader;

import java.util.ArrayList;
import java.util.List;

public class ListBuilderImpl implements ArrayReader, List, Object> {
    @Override
    public List init() {
        return init(16);
    }

    @Override
    public List init(int size) {
        return new ArrayList(size);
    }

    @Override
    public List add(List a, Object item) {
        a.add(item);
        return a;
    }

    @Override
    public List complete(List a) {
        return a;
    }
}