Class ETag

  • All Implemented Interfaces:
    com.fasterxml.jackson.core.TreeNode, com.fasterxml.jackson.databind.JsonSerializable, ScimNode, Serializable, Iterable<com.fasterxml.jackson.databind.JsonNode>

    public class ETag
    extends ScimTextNode
    author Pascal Knueppel
    created at: 19.11.2019 - 20:03

    this class is used as etag representation
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.JsonSerializable

        com.fasterxml.jackson.databind.JsonSerializable.Base
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String WEAK_IDENTIFIER  
      • Fields inherited from class com.fasterxml.jackson.databind.node.TextNode

        _value
    • Constructor Summary

      Constructors 
      Constructor Description
      ETag​(Boolean weak, String tag)  
    • Method Detail

      • parseETag

        public static ETag parseETag​(String version)
        checks the given string and parses it into an entity tag
        Parameters:
        version - the version string
        Returns:
        the entity tag instance representation
      • getEntityTag

        public String getEntityTag()
        Returns:
        the entity tag that is represented by this instance
      • toString

        public String toString()
        Overrides:
        toString in class com.fasterxml.jackson.databind.node.BaseJsonNode
      • toPrettyString

        public String toPrettyString()
        Overrides:
        toPrettyString in class com.fasterxml.jackson.databind.node.BaseJsonNode
      • equals

        public boolean equals​(Object o)
        comparison of ETag's must be done due to the following rules
            +--------+--------+-------------------+-----------------+
            | ETag 1 | ETag 2 | Strong Comparison | Weak Comparison |
            +--------+--------+-------------------+-----------------+
            | W/"1"  | W/"1"  | no match          | match           |
            | W/"1"  | W/"2"  | no match          | no match        |
            | W/"1"  | "1"    | no match          | match           |
            | "1"    | "1"    | match             | match           |
            +--------+--------+-------------------+-----------------+
         
        Overrides:
        equals in class com.fasterxml.jackson.databind.node.TextNode