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

com.iab.gpp.encoder.field.GenericFields Maven / Gradle / Ivy

The newest version!
package com.iab.gpp.encoder.field;

import java.util.HashMap;
import java.util.Map;
import com.iab.gpp.encoder.datatype.DataType;

public class GenericFields implements Fields> {

  private Map> fields = new HashMap<>();
  
  public boolean containsKey(String key) {
    return this.fields.containsKey(key);
  }
  
  public void put(String key, DataType value) {
    this.fields.put(key, value);
  }
  
  public DataType get(String key) {
    return this.fields.get(key);
  }
  
  public Map> getAll() {
    return new HashMap<>(this.fields);
  }

  public void reset(Fields> fields) {
    this.fields.clear();
    this.fields.putAll(fields.getAll());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy