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

cloud.eppo.api.ContextAttributes Maven / Gradle / Ivy

There is a newer version: 3.3.2
Show newest version
package cloud.eppo.api;

import java.util.HashMap;
import java.util.Map;

public class ContextAttributes implements DiscriminableAttributes {

  private Attributes numericAttributes;
  private Attributes categoricalAttributes;

  public ContextAttributes() {
    this(new Attributes(), new Attributes());
  }

  public ContextAttributes(Attributes numericAttributes, Attributes categoricalAttributes) {
    this.numericAttributes = numericAttributes;
    this.categoricalAttributes = categoricalAttributes;
  }

  @Override
  public Attributes getNumericAttributes() {
    return numericAttributes;
  }

  public void setNumericAttributes(Attributes numericAttributes) {
    this.numericAttributes = numericAttributes;
  }

  @Override
  public Attributes getCategoricalAttributes() {
    return categoricalAttributes;
  }

  public void setCategoricalAttributes(Attributes categoricalAttributes) {
    this.categoricalAttributes = categoricalAttributes;
  }

  @Override
  public Attributes getAllAttributes() {
    Map allAttributes = new HashMap<>();
    allAttributes.putAll(numericAttributes);
    allAttributes.putAll(categoricalAttributes);
    return new Attributes(allAttributes);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy