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 
      Modifier and Type Class Description
      static class  ETag.ETagBuilder  
      • 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 Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ETag.ETagBuilder builder()  
      boolean equals​(Object o)
      comparison of ETag's must be done due to the following rules
      String getEntityTag()  
      String getTag()
      the string character representation for etag
      boolean isWeak()
      tells us if this representation is a weak etag or not
      static ETag newInstance​(String version)
      a creation method especially used with the method ScimObjectNode.getStringAttribute(String, Class)
      static ETag parseETag​(String version)
      checks the given string and parses it into an entity tag
      String toPrettyString()  
      String toString()  
      • Methods inherited from class com.fasterxml.jackson.databind.node.TextNode

        appendQuoted, asBoolean, asDouble, asInt, asLong, asText, asText, asToken, binaryValue, getBinaryValue, getNodeType, hashCode, serialize, textValue, valueOf
      • Methods inherited from class com.fasterxml.jackson.databind.node.ValueNode

        _at, deepCopy, findParent, findParents, findValue, findValues, findValuesAsText, get, get, has, has, hasNonNull, hasNonNull, isEmpty, path, path, serializeWithType
      • Methods inherited from class com.fasterxml.jackson.databind.node.BaseJsonNode

        findPath, numberType, required, required, traverse, traverse
      • Methods inherited from class com.fasterxml.jackson.databind.JsonNode

        _reportRequiredViolation, _this, asBoolean, asDouble, asInt, asLong, at, at, bigIntegerValue, booleanValue, canConvertToExactIntegral, canConvertToInt, canConvertToLong, decimalValue, doubleValue, elements, equals, fieldNames, fields, findParents, findValues, findValuesAsText, floatValue, intValue, isArray, isBigDecimal, isBigInteger, isBinary, isBoolean, isContainerNode, isDouble, isFloat, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isMissingNode, isNull, isNumber, isObject, isPojo, isShort, isTextual, isValueNode, iterator, longValue, numberValue, require, requiredAt, requiredAt, requireNonNull, shortValue, size, with, withArray
      • Methods inherited from class com.fasterxml.jackson.databind.JsonSerializable.Base

        isEmpty
    • 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
      • isWeak

        public boolean isWeak()
        tells us if this representation is a weak etag or not
      • getTag

        public String getTag()
        the string character representation for etag