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

gnu.trove.Decorators Maven / Gradle / Ivy

Go to download

The Trove library provides high speed regular and primitive collections for Java.

There is a newer version: 3.0.3
Show newest version
///////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2008, Robert D. Eden All Rights Reserved.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
///////////////////////////////////////////////////////////////////////////////


package gnu.trove;


import java.util.*;

import gnu.trove.decorator.*;



/**
 * This is a static utility class that provides functions for simplifying creation of
 * decorators.
 *
 * @author  Robert D. Eden
 * @since   Trove 2.1
 */
public class Decorators {
    // Hide the constructor
    private Decorators() {}

    
    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TDoubleDoubleHashMap map ) {
        return new TDoubleDoubleHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TDoubleFloatHashMap map ) {
        return new TDoubleFloatHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TDoubleIntHashMap map ) {
        return new TDoubleIntHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TDoubleLongHashMap map ) {
        return new TDoubleLongHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TDoubleByteHashMap map ) {
        return new TDoubleByteHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TDoubleShortHashMap map ) {
        return new TDoubleShortHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TFloatDoubleHashMap map ) {
        return new TFloatDoubleHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TFloatFloatHashMap map ) {
        return new TFloatFloatHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TFloatIntHashMap map ) {
        return new TFloatIntHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TFloatLongHashMap map ) {
        return new TFloatLongHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TFloatByteHashMap map ) {
        return new TFloatByteHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TFloatShortHashMap map ) {
        return new TFloatShortHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TIntDoubleHashMap map ) {
        return new TIntDoubleHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TIntFloatHashMap map ) {
        return new TIntFloatHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TIntIntHashMap map ) {
        return new TIntIntHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TIntLongHashMap map ) {
        return new TIntLongHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TIntByteHashMap map ) {
        return new TIntByteHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TIntShortHashMap map ) {
        return new TIntShortHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TLongDoubleHashMap map ) {
        return new TLongDoubleHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TLongFloatHashMap map ) {
        return new TLongFloatHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TLongIntHashMap map ) {
        return new TLongIntHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TLongLongHashMap map ) {
        return new TLongLongHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TLongByteHashMap map ) {
        return new TLongByteHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TLongShortHashMap map ) {
        return new TLongShortHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TByteDoubleHashMap map ) {
        return new TByteDoubleHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TByteFloatHashMap map ) {
        return new TByteFloatHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TByteIntHashMap map ) {
        return new TByteIntHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TByteLongHashMap map ) {
        return new TByteLongHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TByteByteHashMap map ) {
        return new TByteByteHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TByteShortHashMap map ) {
        return new TByteShortHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TShortDoubleHashMap map ) {
        return new TShortDoubleHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TShortFloatHashMap map ) {
        return new TShortFloatHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TShortIntHashMap map ) {
        return new TShortIntHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TShortLongHashMap map ) {
        return new TShortLongHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TShortByteHashMap map ) {
        return new TShortByteHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static Map wrap( TShortShortHashMap map ) {
        return new TShortShortHashMapDecorator( map );
    }


    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static  Map wrap( TObjectDoubleHashMap map ) {
        return new TObjectDoubleHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static  Map wrap( TObjectFloatHashMap map ) {
        return new TObjectFloatHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static  Map wrap( TObjectIntHashMap map ) {
        return new TObjectIntHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static  Map wrap( TObjectLongHashMap map ) {
        return new TObjectLongHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static  Map wrap( TObjectByteHashMap map ) {
        return new TObjectByteHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static  Map wrap( TObjectShortHashMap map ) {
        return new TObjectShortHashMapDecorator( map );
    }


    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static  Map wrap( TDoubleObjectHashMap map ) {
        return new TDoubleObjectHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static  Map wrap( TFloatObjectHashMap map ) {
        return new TFloatObjectHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static  Map wrap( TIntObjectHashMap map ) {
        return new TIntObjectHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static  Map wrap( TLongObjectHashMap map ) {
        return new TLongObjectHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static  Map wrap( TByteObjectHashMap map ) {
        return new TByteObjectHashMapDecorator( map );
    }

    /**
     * Wrap the given map in a decorator that uses the standard {@link java.util.Map Map}
     * interface.
     */
    public static  Map wrap( TShortObjectHashMap map ) {
        return new TShortObjectHashMapDecorator( map );
    }


    /**
     * Wrap the given set in a decorator that uses the standard {@link java.util.Set Set}
     * interface.
     */
    public static Set wrap( TDoubleHashSet set ) {
        return new TDoubleHashSetDecorator( set );
    }

    /**
     * Wrap the given set in a decorator that uses the standard {@link java.util.Set Set}
     * interface.
     */
    public static Set wrap( TFloatHashSet set ) {
        return new TFloatHashSetDecorator( set );
    }

    /**
     * Wrap the given set in a decorator that uses the standard {@link java.util.Set Set}
     * interface.
     */
    public static Set wrap( TIntHashSet set ) {
        return new TIntHashSetDecorator( set );
    }

    /**
     * Wrap the given set in a decorator that uses the standard {@link java.util.Set Set}
     * interface.
     */
    public static Set wrap( TLongHashSet set ) {
        return new TLongHashSetDecorator( set );
    }

    /**
     * Wrap the given set in a decorator that uses the standard {@link java.util.Set Set}
     * interface.
     */
    public static Set wrap( TByteHashSet set ) {
        return new TByteHashSetDecorator( set );
    }

    /**
     * Wrap the given set in a decorator that uses the standard {@link java.util.Set Set}
     * interface.
     */
    public static Set wrap( TShortHashSet set ) {
        return new TShortHashSetDecorator( set );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy