nl.clockwork.ebms.Predicates Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebms-core Show documentation
Show all versions of ebms-core Show documentation
This library implements the ebXML Message Specification version 2.0, which defines a communications-protocol neutral method for exchanging electronic business messages through the exchange of XML based messages.
/**
* Copyright 2011 Clockwork
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package nl.clockwork.ebms;
import java.util.Arrays;
import java.util.function.Predicate;
public final class Predicates
{
public static Predicate contains(String...values)
{
return obj -> Arrays.stream(values).anyMatch(v -> obj.contains(v));
}
public static Predicate startsWith(String value)
{
return obj -> obj.startsWith(value);
}
public static Predicate endsWith(String value)
{
return obj -> obj.endsWith(value);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy