com.lithium.ldn.starql.models.QlConstraintValueCollection Maven / Gradle / Ivy
package com.lithium.ldn.starql.models;
import java.util.Iterator;
import java.util.List;
import com.google.common.collect.ImmutableList;
/**
* A collection of {@link QlConstraintValue} for a boolean constraint in the WHERE clause of
* a StarQL SELECT Statement.
*
* @author Jake Scheps
* @author David Esposito
*/
public final class QlConstraintValueCollection extends QlConstraintValue implements Iterable {
private final ImmutableList value;
public QlConstraintValueCollection(TypeT... values) {
this.value = ImmutableList.copyOf(values);
}
public QlConstraintValueCollection(List value) {
this.value = ImmutableList.copyOf(value);
}
public List getValue() {
return value;
}
@Override
public String toString() {
return value.toString();
}
@Override
public Iterator iterator() {
return value.iterator();
}
@Override
public Object get() {
return getValue();
}
}