com.sun.ws.rest.api.core
Class EntityTag

java.lang.Object
  extended by com.sun.ws.rest.api.core.EntityTag

public class EntityTag
extends java.lang.Object

An abstraction for the value of a HTTP Entity Tag, used as the value of an ETag response header.

See Also:
HTTP/1.1 section 3.11

Constructor Summary
EntityTag(java.lang.String value)
          Creates a new instance of a strong EntityTag
EntityTag(java.lang.String value, boolean weak)
          Creates a new instance of an EntityTag
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares obj to this tag to see if they are the same considering weakness and value.
 java.lang.String getValue()
          Get the value of an EntityTag
 boolean isWeak()
          Check the strength of an EntityTag
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityTag

public EntityTag(java.lang.String value)
Creates a new instance of a strong EntityTag

Parameters:
value - the value of the tag

EntityTag

public EntityTag(java.lang.String value,
                 boolean weak)
Creates a new instance of an EntityTag

Parameters:
value - the value of the tag
weak - true if this represents a weak tag, false otherwise
Method Detail

isWeak

public boolean isWeak()
Check the strength of an EntityTag

Returns:
true if this represents a weak tag, false otherwise

getValue

public java.lang.String getValue()
Get the value of an EntityTag

Returns:
the value of the tag

equals

public boolean equals(java.lang.Object obj)
Compares obj to this tag to see if they are the same considering weakness and value.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare to
Returns:
true if the two tags are the same, false otherwise.