- java.lang.Object
-
- org.github.gestalt.config.tag.Tags
-
public final class Tags extends java.lang.ObjectRepresents a collection of tags that can be applied to data.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Tagsenvironment(java.lang.String value)Create and return a new tag of type environment with value.static Tagsenvironments(java.lang.String... value)Create and return a new tag of type environment with value.booleanequals(java.lang.Object o)java.util.Set<Tag>getTags()Get the tags.inthashCode()static Tagsof()Create an empty collection of tags.static Tagsof(java.lang.String... tagsVarg)Create a tags from a varg of strings.static Tagsof(java.util.List<Tag> tags)Create a tags from a list of tag.static Tagsof(java.util.Set<Tag> tags)Create a tags from a set of tag.static Tagsof(Tag... tag)Create a tags from a varg of tags.static Tagsprofile(java.lang.String value)Create and return a new tag of type profile with value.static Tagsprofiles(java.lang.String... value)Create and return a new tag of type profile with value.
-
-
-
Method Detail
-
of
public static Tags of()
Create an empty collection of tags.- Returns:
- Tags
-
of
public static Tags of(java.util.List<Tag> tags)
Create a tags from a list of tag.- Parameters:
tags- list of tag- Returns:
- Tags
-
of
public static Tags of(java.util.Set<Tag> tags)
Create a tags from a set of tag.- Parameters:
tags- set of tag- Returns:
- Tags
-
of
public static Tags of(Tag... tag)
Create a tags from a varg of tags.- Parameters:
tag- varg of tag- Returns:
- Tags
-
of
public static Tags of(java.lang.String... tagsVarg) throws GestaltException
Create a tags from a varg of strings. Must have pairs of key and values where it is key1, value1, key2, value2...- Parameters:
tagsVarg- string vargs- Returns:
- Tags
- Throws:
GestaltException- if there is a missmatch in key and value, where we have a key but no value.
-
profile
public static Tags profile(java.lang.String value)
Create and return a new tag of type profile with value.- Parameters:
value- the profile- Returns:
- tags with the profile
-
profiles
public static Tags profiles(java.lang.String... value)
Create and return a new tag of type profile with value.- Parameters:
value- the profiles- Returns:
- tags with the profiles
-
environment
public static Tags environment(java.lang.String value)
Create and return a new tag of type environment with value.- Parameters:
value- the environment- Returns:
- tags with the environment
-
environments
public static Tags environments(java.lang.String... value)
Create and return a new tag of type environment with value.- Parameters:
value- the environments- Returns:
- tags with the environments
-
getTags
public java.util.Set<Tag> getTags()
Get the tags.- Returns:
- tags
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-