Class MatchingEntityTag


  • public class MatchingEntityTag
    extends javax.ws.rs.core.EntityTag
    A matching entity tag.

    Note that this type and it's super type cannot be used to create request header values for If-Match and If-None-Match of the form If-Match: * or If-None-Match: * as * is not a valid entity tag.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Set<MatchingEntityTag> ANY_MATCH
      An empty set that corresponds to If-Match: * or If-None-Match: *.
    • Constructor Summary

      Constructors 
      Constructor Description
      MatchingEntityTag​(java.lang.String value)
      Create new strongly validating entity tag.
      MatchingEntityTag​(java.lang.String value, boolean weak)
      Create new matching entity tag.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static MatchingEntityTag valueOf​(HttpHeaderReader reader)
      Create new matching entity tag out of provided header reader.
      • Methods inherited from class javax.ws.rs.core.EntityTag

        equals, getValue, hashCode, isWeak, toString, valueOf
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ANY_MATCH

        public static final java.util.Set<MatchingEntityTag> ANY_MATCH
        An empty set that corresponds to If-Match: * or If-None-Match: *.
    • Constructor Detail

      • MatchingEntityTag

        public MatchingEntityTag​(java.lang.String value)
        Create new strongly validating entity tag.
        Parameters:
        value - ETag header value.
      • MatchingEntityTag

        public MatchingEntityTag​(java.lang.String value,
                                 boolean weak)
        Create new matching entity tag.
        Parameters:
        value - ETag header value.
        weak - should be set to false, if strong validation is required, otherwise should be set to true.
    • Method Detail

      • valueOf

        public static MatchingEntityTag valueOf​(HttpHeaderReader reader)
                                         throws java.text.ParseException
        Create new matching entity tag out of provided header reader.
        Parameters:
        reader - HTTP header content reader.
        Returns:
        a new matching entity tag.
        Throws:
        java.text.ParseException - in case the header could not be parsed.