Class EntityTagMatchers
- java.lang.Object
-
- org.eclipse.ditto.model.base.headers.entitytag.EntityTagMatchers
-
- All Implemented Interfaces:
Iterable<EntityTagMatcher>
@Immutable public final class EntityTagMatchers extends Object implements Iterable<EntityTagMatcher>
Java representation for a List ofEntityTagMatcher
.
-
-
Field Summary
Fields Modifier and Type Field Description static Pattern
ENTITY_TAG_MATCHERS_PATTERN
Regular expression pattern for splitting a comma separated CharSequence ofEntityTagMatcher
s.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
void
forEach(Consumer<? super EntityTagMatcher> action)
static EntityTagMatchers
fromCommaSeparatedString(String commaSeparatedEntityTagString)
BuildsEntityTagMatchers
from a String that contains comma separated values of entity-tag-matchers.static EntityTagMatchers
fromList(List<EntityTagMatcher> entityTagMatchers)
BuildsEntityTagMatchers
from a List ofEntityTagMatcher
s.static EntityTagMatchers
fromStrings(String... entityTagMatcherStrings)
BuildsEntityTagMatchers
from a Strings that contain values of entity-tag-matchers.int
hashCode()
boolean
isEmpty()
Iterator<EntityTagMatcher>
iterator()
Spliterator<EntityTagMatcher>
spliterator()
Stream<EntityTagMatcher>
stream()
String
toString()
-
-
-
Field Detail
-
ENTITY_TAG_MATCHERS_PATTERN
public static final Pattern ENTITY_TAG_MATCHERS_PATTERN
Regular expression pattern for splitting a comma separated CharSequence ofEntityTagMatcher
s.
-
-
Method Detail
-
fromCommaSeparatedString
public static EntityTagMatchers fromCommaSeparatedString(String commaSeparatedEntityTagString)
BuildsEntityTagMatchers
from a String that contains comma separated values of entity-tag-matchers. Spaces before and after the comma will be removed.- Parameters:
commaSeparatedEntityTagString
- the String that contains comma separated values ofEntityTagMatcher
s.- Returns:
- EntityTagMatchers that contain all EntityTagMatchers of the comma separated String.
- Throws:
DittoHeaderInvalidException
- if one of the values in the comma separated String is neither an "*" nor a validEntityTag
according toEntityTag.isValid(CharSequence)
.
-
fromStrings
public static EntityTagMatchers fromStrings(String... entityTagMatcherStrings)
BuildsEntityTagMatchers
from a Strings that contain values of entity-tag-matchers.- Parameters:
entityTagMatcherStrings
- The Strings that contain values of entity-tag-matchers.- Returns:
- EntityTagMatchers that contain all
EntityTagMatcher
s of the given Strings. - Throws:
DittoHeaderInvalidException
- if one of the Strings is not a validEntityTag
according toEntityTag.isValid(CharSequence)
.
-
fromList
public static EntityTagMatchers fromList(List<EntityTagMatcher> entityTagMatchers)
BuildsEntityTagMatchers
from a List ofEntityTagMatcher
s.- Parameters:
entityTagMatchers
- the list of EntityTagMatchers that should be contained in the returned instance.- Returns:
- an instance of EntityTagMatchers containing the given list of EntityTagMatchers.
- Throws:
NullPointerException
- ifentityTagMatchers
isnull
.
-
isEmpty
public boolean isEmpty()
-
stream
public Stream<EntityTagMatcher> stream()
-
iterator
public Iterator<EntityTagMatcher> iterator()
- Specified by:
iterator
in interfaceIterable<EntityTagMatcher>
-
forEach
public void forEach(Consumer<? super EntityTagMatcher> action)
- Specified by:
forEach
in interfaceIterable<EntityTagMatcher>
-
spliterator
public Spliterator<EntityTagMatcher> spliterator()
- Specified by:
spliterator
in interfaceIterable<EntityTagMatcher>
-
-