nl.vpro.domain.api.ExtendedTextMatcherList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-domain Show documentation
Show all versions of api-domain Show documentation
Contains the objects used by the Frontend API, like forms and result objects
The newest version!
/*
* Copyright (C) 2016 Licensed under the Apache License, Version 2.0
* VPRO The Netherlands
*/
package nl.vpro.domain.api;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import nl.vpro.domain.api.jackson.ExtendedTextMatcherListJson;
/**
* @author rico
* @since 4.6
*/
@XmlAccessorType(XmlAccessType.NONE)
@XmlType(name = "extendedTextMatcherListType")
@JsonSerialize(using = ExtendedTextMatcherListJson.Serializer.class)
@JsonDeserialize(using = ExtendedTextMatcherListJson.Deserializer.class)
public class ExtendedTextMatcherList extends AbstractTextMatcherList {
public ExtendedTextMatcherList() {
super();
}
public static ExtendedTextMatcherList must(ExtendedTextMatcher... values) {
return new ExtendedTextMatcherList(Match.MUST, values);
}
public static ExtendedTextMatcherList must(Stream values) {
return new ExtendedTextMatcherList(values.collect(Collectors.toList()), Match.MUST);
}
public static ExtendedTextMatcherList should(ExtendedTextMatcher... values) {
return new ExtendedTextMatcherList(Match.SHOULD, values);
}
public static ExtendedTextMatcherList should(Stream values) {
return new ExtendedTextMatcherList(values.collect(Collectors.toList()), Match.SHOULD);
}
public static ExtendedTextMatcherList not(ExtendedTextMatcher... values) {
return new ExtendedTextMatcherList(Match.NOT, values);
}
public static ExtendedTextMatcherList not(Stream values) {
return new ExtendedTextMatcherList(values.collect(Collectors.toList()), Match.NOT);
}
public ExtendedTextMatcherList(List values, Match match) {
super(match, values);
}
public ExtendedTextMatcherList(ExtendedTextMatcher... values) {
super(DEFAULT_MATCH, Arrays.asList(values));
}
public ExtendedTextMatcherList(Match match, ExtendedTextMatcher... values) {
super(match, Arrays.asList(values));
}
@Override
@XmlElement(name = "matcher")
public List getMatchers() {
return super.getMatchers();
}
@Override
public void setMatchers(List matchers) {
super.setMatchers(matchers);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy