java.lang.Object
com.fasterxml.jackson.databind.JsonSerializable.Base
com.fasterxml.jackson.databind.JsonNode
com.fasterxml.jackson.databind.node.BaseJsonNode
com.fasterxml.jackson.databind.node.ValueNode
com.fasterxml.jackson.databind.node.TextNode
de.captaingoldfish.scim.sdk.common.resources.base.ScimTextNode
de.captaingoldfish.scim.sdk.common.etag.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:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    override lombok builder with public constructor

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonNode

    com.fasterxml.jackson.databind.JsonNode.OverwriteMode

    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 final String
     

    Fields inherited from class com.fasterxml.jackson.databind.node.TextNode

    _value
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
     
    boolean
    comparison of ETag's must be done due to the following rules
     
    the string character representation for etag
    boolean
    tells us if this representation is a weak etag or not
    static ETag
    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
     
     

    Methods inherited from class de.captaingoldfish.scim.sdk.common.resources.base.ScimTextNode

    getSchemaAttribute

    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

    _bigIntFromBigDec, _jsonPointerIfValid, _reportWrongNodeOperation, _reportWrongNodeType, _withArray, _withObject, _withXxxMayReplace, _withXxxVerifyReplace, findPath, numberType, required, required, traverse, traverse, withArray, withObject

    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, properties, require, requiredAt, requiredAt, requireNonNull, shortValue, size, with, withArray, withArray, withArray, withObject, withObject, withObject

    Methods inherited from class com.fasterxml.jackson.databind.JsonSerializable.Base

    isEmpty

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Field Details

  • Constructor Details

  • Method Details

    • newInstance

      public static ETag newInstance(String version)
      a creation method especially used with the method ScimObjectNode.getStringAttribute(String, Class)
      Parameters:
      version - an eTag that should be parsed
      Returns:
      a new ETag instance
    • 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
    • builder

      public static ETag.ETagBuilder builder()
    • 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