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

org.codehaus.plexus.context.ContextMapAdapter Maven / Gradle / Ivy

Go to download

Statistical sampling library for use in virtdata libraries, based on apache commons math 4

There is a newer version: 5.17.0
Show newest version
package org.codehaus.plexus.context;


import java.util.HashMap;

public class ContextMapAdapter
    extends HashMap
{
    private Context context;

    public ContextMapAdapter( Context context )
    {
        this.context = context;
    }

    public Object get( Object key )
    {
        try
        {
            Object value = context.get( key );
            
            if ( value instanceof String )
            {
                return value;
            }
            else
            {
                return null;
            }
        }
        catch ( ContextException e )
        {
            return null;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy