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

com.arextest.diff.model.eigen.EigenOptions Maven / Gradle / Ivy

There is a newer version: 0.2.15
Show newest version
package com.arextest.diff.model.eigen;

import com.arextest.diff.model.enumeration.CategoryType;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class EigenOptions {

  /**
   * @see CategoryType
   */
  private String categoryType;

  /**
   * the collection of the node name which is ignore
   */
  private Set ignoreNodes;

  /**
   * the collection of the node path which is ignore
   */
  private Set> exclusions;

  public EigenOptions() {
  }

  public static EigenOptions options() {
    return new EigenOptions();
  }

  public EigenOptions putCategoryType(String categoryType) {
    this.categoryType = categoryType;
    return this;
  }

  public EigenOptions putIgnoreNodes(String nodeName) {
    if (nodeName == null || nodeName.isEmpty()) {
      return this;
    }
    if (this.ignoreNodes == null) {
      this.ignoreNodes = new HashSet<>();
    }
    this.ignoreNodes.add(nodeName);
    return this;
  }

  public EigenOptions putIgnoreNodes(Collection nodeNames) {
    if (nodeNames == null || nodeNames.isEmpty()) {
      return this;
    }
    if (this.ignoreNodes == null) {
      this.ignoreNodes = new HashSet<>();
    }
    this.ignoreNodes.addAll(nodeNames);
    return this;
  }

  public EigenOptions putExclusions(List path) {
    if (path == null || path.isEmpty()) {
      return this;
    }
    if (this.exclusions == null) {
      this.exclusions = new HashSet<>();
    }
    this.exclusions.add(path);
    return this;
  }

  public EigenOptions putExclusions(Collection> paths) {
    if (paths == null || paths.isEmpty()) {
      return this;
    }
    if (this.exclusions == null) {
      this.exclusions = new HashSet<>();
    }
    this.exclusions.addAll(paths);
    return this;
  }

  public String getCategoryType() {
    return categoryType;
  }

  public Set> getExclusions() {
    return exclusions;
  }

  public Set getIgnoreNodes() {
    return ignoreNodes;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy