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

dev.galasa.cicsts.CicstsHashMap Maven / Gradle / Ivy

There is a newer version: 0.38.0
Show newest version
/*
 * Licensed Materials - Property of IBM
 * 
 * (c) Copyright IBM Corp. 2020.
 */
package dev.galasa.cicsts;

import java.util.HashMap;

import javax.validation.constraints.NotNull;

/**
 * CICS TS wrapper class to HashMap to provide additional
 * functionality for use with CECI, CEMT and CEDA
 */
public class CicstsHashMap extends HashMap {
    private static final long serialVersionUID = 1L;
    
    public boolean isParameterEquals(@NotNull String parameter, @NotNull String value) {
        String testValue = get(parameter);
        if (testValue == null) {
            return false;
        }
        
        return testValue.equals(value);
    }

    public void checkParameterEquals(@NotNull String parameter, @NotNull String value) throws CicstsManagerException {
        if (!isParameterEquals(parameter, value)) {
            throw new CicstsManagerException("Parameter " + parameter + " does not equal " + value);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy