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

gov.nasa.pds.api.registry.search.SimpleRequestBuildContext Maven / Gradle / Ivy

There is a newer version: 4.5.6
Show newest version
package gov.nasa.pds.api.registry.search;

import java.util.ArrayList;
import java.util.List;

import gov.nasa.pds.api.registry.GroupConstraint;
import gov.nasa.pds.api.registry.RequestBuildContext;
import gov.nasa.pds.api.registry.util.GroupConstraintImpl;

class SimpleRequestBuildContext implements RequestBuildContext {
  final private boolean justLatest;
  final private List fields;
  final private GroupConstraint preset;

  SimpleRequestBuildContext(boolean justLatest) {
    this.fields = new ArrayList();
    this.justLatest = justLatest;
    this.preset = GroupConstraintImpl.empty();
  }

  SimpleRequestBuildContext(boolean justLatest, List fields) {
    this.fields = fields;
    this.justLatest = justLatest;
    this.preset = GroupConstraintImpl.empty();
  }

  SimpleRequestBuildContext(boolean justLatest, List fields, GroupConstraint preset) {
    this.fields = fields;
    this.justLatest = justLatest;
    this.preset = preset;
  }

  @Override
  public boolean justLatest() {
    return this.justLatest;
  }

  @Override
  public List getFields() {
    return this.fields;
  }

  @Override
  public GroupConstraint getPresetCriteria() {
    return this.preset;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy