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

com.icthh.xm.commons.request.internal.DataAdapterXmRequestContext Maven / Gradle / Ivy

There is a newer version: 4.0.12
Show newest version
package com.icthh.xm.commons.request.internal;

import com.icthh.xm.commons.request.XmRequestContext;

import java.util.Objects;

/**
 * The {@link DataAdapterXmRequestContext} class.
 */
class DataAdapterXmRequestContext implements XmRequestContext {

    private final XmRequestContextData data;

    DataAdapterXmRequestContext(XmRequestContextData data) {
        this.data = Objects.requireNonNull(data, "data can't be null");
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean containsKey(String key) {
        return data.containsKey(key);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public  T getValue(String key, Class type) {
        return data.getValue(key, type);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public  T getValueOrDefault(String key, Class type, T defaultValue) {
        return data.getValueOrDefault(key, type, defaultValue);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy