Package com.mongodb

Class TagSet

  • All Implemented Interfaces:
    <Tag>

    @Immutable
    public final class TagSet
    extends 
    implements <Tag>
    An immutable set of tags, used to select members of a replica set to use for read operations.
    Since:
    2.13
    See Also:
    ReadPreference
    MongoDB documentation
    • Constructor Summary

      Constructors 
      Constructor Description
      TagSet()
      An empty set of tags.
      TagSet​(Tag tag)
      A set of tags contain the single given tag
      <Tag> tagList)
      A set of tags containing the given list of tags.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsAll​(TagSet tagSet)
      Returns true if this tag set contains all of the elements of the specified tag set.
      boolean  o)  
      int hashCode()  
      <Tag> iterator()  
      toString()  
      • Methods inherited from class java.lang.

        , , , , , , ,
      • Methods inherited from interface java.lang.

        ,
    • Constructor Detail

      • TagSet

        public TagSet()
        An empty set of tags.
      • TagSet

        public TagSet​(Tag tag)
        A set of tags contain the single given tag
        Parameters:
        tag - the tag
      • TagSet

        public TagSet​(<Tag> tagList)
        A set of tags containing the given list of tags.
        Parameters:
        tagList - the list of tags
    • Method Detail

      • iterator

        public <Tag> iterator()
        Specified by:
         in interface <Tag>
      • containsAll

        public boolean containsAll​(TagSet tagSet)
        Returns true if this tag set contains all of the elements of the specified tag set.
        Parameters:
        tagSet - tag set to be checked for containment in this tag set
        Returns:
        true if this tag set contains all of the elements of the specified tag set
      • equals

        public boolean equals​( o)
        Overrides:
         in class 
      • hashCode

        public int hashCode()
        Overrides:
         in class 
      • toString

        public  toString()
        Overrides:
         in class