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

ai.stapi.graphoperations.graphLanguage.graphDescription.graphDescriptionBuilder.specificDescriptionBuilders.AbstractSpecificDescriptionBuilder Maven / Gradle / Ivy

There is a newer version: 0.3.2
Show newest version
package ai.stapi.graphoperations.graphLanguage.graphDescription.graphDescriptionBuilder.specificDescriptionBuilders;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public abstract class AbstractSpecificDescriptionBuilder
    implements SpecificGraphDescriptionBuilder {

  private List children = new ArrayList<>();

  public List getChildren() {
    return children;
  }

  public SpecificGraphDescriptionBuilder addChild(SpecificGraphDescriptionBuilder child) {
    this.children.add(child);
    return this;
  }

  @Override
  public SpecificGraphDescriptionBuilder setChildren(
      List children) {
    this.children = new ArrayList<>(children);
    return this;
  }

  @Override
  public SpecificGraphDescriptionBuilder setChildren(SpecificGraphDescriptionBuilder... children) {
    this.children = Arrays.stream(children).collect(Collectors.toCollection(ArrayList::new));
    return this;
  }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy