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

org.msgpack.template.Templates Maven / Gradle / Ivy

Go to download

MessagePack for Java is a binary-based efficient object serialization library in Java.

The newest version!
//
// MessagePack for Java
//
// Copyright (C) 2009 - 2013 FURUHASHI Sadayuki
//
//    Licensed under the Apache License, Version 2.0 (the "License");
//    you may not use this file except in compliance with the License.
//    You may obtain a copy of the License at
//
//        http://www.apache.org/licenses/LICENSE-2.0
//
//    Unless required by applicable law or agreed to in writing, software
//    distributed under the License is distributed on an "AS IS" BASIS,
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//    See the License for the specific language governing permissions and
//    limitations under the License.
//
package org.msgpack.template;

import java.nio.ByteBuffer;
import java.util.List;
import java.util.Map;
import java.util.Collection;
import java.util.Date;
import java.math.BigInteger;
import java.math.BigDecimal;
import org.msgpack.type.Value;

@SuppressWarnings({ "rawtypes", "unchecked" })
public final class Templates {
    public static final Template TValue = ValueTemplate.getInstance();

    public static final Template TByte = ByteTemplate.getInstance();

    public static final Template TShort = ShortTemplate.getInstance();

    public static final Template TInteger = IntegerTemplate.getInstance();

    public static final Template TLong = LongTemplate.getInstance();

    public static final Template TCharacter = CharacterTemplate.getInstance();

    public static final Template TBigInteger = BigIntegerTemplate.getInstance();

    public static final Template TBigDecimal = BigDecimalTemplate.getInstance();

    public static final Template TFloat = FloatTemplate.getInstance();

    public static final Template TDouble = DoubleTemplate.getInstance();

    public static final Template TBoolean = BooleanTemplate.getInstance();

    public static final Template TString = StringTemplate.getInstance();

    public static final Template TByteArray = ByteArrayTemplate.getInstance();

    public static final Template TByteBuffer = ByteBufferTemplate.getInstance();

    public static final Template TDate = DateTemplate.getInstance();

    public static  Template tNotNullable(Template innerTemplate) {
        return new NotNullableTemplate(innerTemplate);
    }

    public static  Template> tList(Template elementTemplate) {
        return new ListTemplate(elementTemplate);
    }

    public static  Template> tMap(Template keyTemplate, Template valueTemplate) {
        return new MapTemplate(keyTemplate, valueTemplate);
    }

    public static  Template> tCollection(Template elementTemplate) {
        return new CollectionTemplate(elementTemplate);
    }

    public static  Template tOrdinalEnum(Class enumClass) {
        return new OrdinalEnumTemplate(enumClass);
    }

    // public static Template tClass(Class target) {
    // // TODO
    // }

    @Deprecated
    public static Template tByte() {
        return TByte;
    }

    @Deprecated
    public static Template tShort() {
        return TShort;
    }

    @Deprecated
    public static Template tInteger() {
        return TInteger;
    }

    @Deprecated
    public static Template tLong() {
        return TLong;
    }

    @Deprecated
    public static Template tCharacter() {
        return TCharacter;
    }

    @Deprecated
    public static Template tBigInteger() {
        return TBigInteger;
    }

    @Deprecated
    public static Template tBigDecimal() {
        return TBigDecimal;
    }

    @Deprecated
    public static Template tFloat() {
        return TFloat;
    }

    @Deprecated
    public static Template tDouble() {
        return TDouble;
    }

    @Deprecated
    public static Template tBoolean() {
        return TBoolean;
    }

    @Deprecated
    public static Template tString() {
        return TString;
    }

    @Deprecated
    public static Template tByteArray() {
        return TByteArray;
    }

    @Deprecated
    public static Template tByteBuffer() {
        return TByteBuffer;
    }

    @Deprecated
    public static Template tDate() {
        return TDate;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy