org.melati.util
Class HttpHeader.TokenAndQValue

Package class diagram package HttpHeader.TokenAndQValue
java.lang.Object
  extended by org.melati.util.HttpHeader.TokenAndQValue
Direct Known Subclasses:
AcceptCharset.CharsetAndQValue
Enclosing class:
HttpHeader

public static class HttpHeader.TokenAndQValue
extends Object

A token and associated qvalue.


Field Summary
 float q
          Value between zero and one with at most 3 decimal places.
 String token
          Token followed by a semicolon separator.
 
Constructor Summary
HttpHeader.TokenAndQValue()
          Create an uninitialised instance.
HttpHeader.TokenAndQValue(HttpHeader.Tokenizer t)
          Create an instance and initialise it by reading the given tokenizer.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token

public String token
Token followed by a semicolon separator.


q

public float q
Value between zero and one with at most 3 decimal places.

q stands for "quality" but the RFC 2616 says this is not completely accurate. Values closer to 1.0 are better. Zero means completely unfit.

The default is 1.0 if not explicitly initialised and this appears to be correct for most possible uses if not all.

Constructor Detail

HttpHeader.TokenAndQValue

public HttpHeader.TokenAndQValue()
Create an uninitialised instance.


HttpHeader.TokenAndQValue

public HttpHeader.TokenAndQValue(HttpHeader.Tokenizer t)
                          throws HttpHeader.HttpHeaderException
Create an instance and initialise it by reading the given tokenizer.

Throws:
HttpHeader.HttpHeaderException


Copyright © 2000-2010 PanEris. All Rights Reserved.