com.ibm.fhir.cql.engine.searchparam.OrParameter Maven / Gradle / Ivy
The newest version!
/*
* (C) Copyright IBM Corp. 2021
*
* SPDX-License-Identifier: Apache-2.0
*/
package com.ibm.fhir.cql.engine.searchparam;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.ibm.fhir.search.SearchConstants.Modifier;
public class OrParameter implements IQueryParameterOr {
private String name;
private Modifier modifier;
private List parts;
public OrParameter() {
super();
}
public OrParameter(List parts) {
setParts(parts);
}
public OrParameter(Modifier modifier, List parts) {
setModifier(modifier);
setParts(parts);
}
@SafeVarargs
public OrParameter(T... parts) {
this.parts = Arrays.asList(parts);
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public Modifier getModifier() {
return modifier;
}
public void setModifier(Modifier modifier) {
this.modifier = modifier;
}
public List getParts() {
return parts;
}
public void setParts(List parts) {
this.parts = parts;
}
public void addOr(T part) {
if (this.parts == null) {
this.parts = new ArrayList<>();
}
this.parts.add(part);
}
@Override
public List getParameterValues() {
return parts;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy