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

com.cognitect.transit.impl.MapBuilderImpl 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.MapReader;

import java.util.HashMap;
import java.util.Map;

public class MapBuilderImpl implements MapReader, Map, Object, Object> {
    @Override
    public Map init() {
        return init(16);
    }

    @Override
    public Map init(int size) {
        return new HashMap(size);
    }

    @Override
    public Map add(Map m, Object key, Object value) {
        m.put(key, value);
        return m;
    }

    @Override
    public Map complete(Map m) {
        return m;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy