com.github.saiprasadkrishnamurthy.databindings.model.DataElements Maven / Gradle / Ivy
The newest version!
package com.github.saiprasadkrishnamurthy.databindings.model;
import java.util.HashMap;
import java.util.Optional;
/**
* A container for all the scanned parsed data elements.
*
* @author Sai.
*/
public class DataElements extends HashMap {
/**
* Adds the data element.
*
* @param dataElement
*/
public void add(final DataElement dataElement) {
this.put(dataElement.getQualifiedName(), dataElement);
}
/**
* Gets the DataElement
*
* @param qualifiedName
* @return
*/
public Optional get(final String qualifiedName) {
return super.get(qualifiedName) == null ? Optional.empty() : Optional.of(super.get(qualifiedName));
}
}