net.anotheria.anodoc.query2.QueryContainsProperty Maven / Gradle / Ivy
package net.anotheria.anodoc.query2;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import net.anotheria.anodoc.data.Property;
import net.anotheria.util.StringUtils;
/**
* Query to List/Array Property. Passes only if Property contains all queried values.
*
* IMPORTANT:Not properly tested yet. Use on own risk!!!!
*
* @author denis
*
*/
public class QueryContainsProperty extends QueryProperty{
/**
*
*/
private static final long serialVersionUID = -8649073486730051958L;
public QueryContainsProperty(String aName, T... aValues){
this(aName, Arrays.asList(aValues));
}
public QueryContainsProperty(String aName, Collection aValues){
super(aName, aValues);
}
@SuppressWarnings("unchecked")
@Override
public boolean doesMatch(Object o) {
if(o== null)
return getOriginalValue() == null;
List properties = ((List)o);
Set
© 2015 - 2025 Weber Informatics LLC | Privacy Policy