Package com.mongodb

Class Tag


  • @Immutable
    public final class Tag
    extends java.lang.Object
    A replica set tag.
    Since:
    2.13
    • Constructor Summary

      Constructors 
      Constructor Description
      Tag​(java.lang.String name, java.lang.String value)
      Construct a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String getName()
      Gets the name of the replica set tag.
      java.lang.String getValue()
      Gets the value of the replica set tag.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Tag

        public Tag​(java.lang.String name,
                   java.lang.String value)
        Construct a new instance.
        Parameters:
        name - the tag name
        value - the value of the tag
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the name of the replica set tag.
        Returns:
        the name
      • getValue

        public java.lang.String getValue()
        Gets the value of the replica set tag.
        Returns:
        the value
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object