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

com.amazonaws.hal.ImmediatelyExpiringCache Maven / Gradle / Ivy

/*
 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License").
 * You may not use this file except in compliance with the License.
 * A copy of the License is located at
 *
 *  http://aws.amazon.com/apache2.0
 *
 * or in the "license" file accompanying this file. This file 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 com.amazonaws.hal;


import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Set;


public class ImmediatelyExpiringCache
        implements Map {

    //-------------------------------------------------------------
    // Variables - Private - Static
    //-------------------------------------------------------------

    private static ImmediatelyExpiringCache instance = new ImmediatelyExpiringCache();


    //-------------------------------------------------------------
    // Constructors
    //-------------------------------------------------------------

    private ImmediatelyExpiringCache() {
    }


    //-------------------------------------------------------------
    // Methods - Public - Static
    //-------------------------------------------------------------

    public static ImmediatelyExpiringCache getInstance() {
        return instance;
    }


    //-------------------------------------------------------------
    // Implementation - Map
    //-------------------------------------------------------------

    @Override
    public int size() {
        return 0;
    }


    @Override
    public boolean isEmpty() {
        return true;
    }


    @Override
    public boolean containsKey(Object key) {
        return false;
    }


    @Override
    public boolean containsValue(Object value) {
        return false;
    }


    @Override
    public Object get(Object key) {
        return null;
    }


    @Override
    public Object put(String key, Object value) {
        return value;
    }


    @Override
    public Object remove(Object key) {
        return null;
    }


    @Override
    public void putAll(Map m) {
    }


    @Override
    public void clear() {
    }


    @Override
    public Set keySet() {
        return Collections.emptySet();
    }


    @Override
    public Collection values() {
        return Collections.emptySet();
    }


    @Override
    public Set> entrySet() {
        return Collections.emptySet();
    }
}