- java.lang.Object
-
- net.sourceforge.urin.Query<ENCODES>
-
- Type Parameters:
ENCODES
- The type of value represented by the query -String
in the general case.
- Direct Known Subclasses:
HttpQuery
public class Query<ENCODES> extends java.lang.Object
A query component of a URI. Immutable and thread safe.- See Also:
- RFC 3986 - Query
-
-
Field Summary
Fields Modifier and Type Field Description static MakingDecoder<Query<java.lang.String>,java.lang.String,java.lang.String>
STRING_QUERY_MAKING_DECODER
TheMakingDecoder
used by standard queries.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Query(ENCODES value, PercentEncodingPartial<ENCODES,java.lang.String> percentEncodingPartial)
Constructor for subclasses ofQuery
with scheme specific percent encoding of characters beyond that specified for generic URIQuery
s.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
int
hashCode()
static Query<java.lang.String>
query(java.lang.String query)
Factory method for creatingQuery
s.static MakingDecoder<Query<java.lang.String>,java.lang.String,java.lang.String>
stringQueryMaker()
Deprecated.useSTRING_QUERY_MAKING_DECODER
instead.java.lang.String
toString()
ENCODES
value()
Gets the (non-encoded) value of this query.
-
-
-
Field Detail
-
STRING_QUERY_MAKING_DECODER
public static final MakingDecoder<Query<java.lang.String>,java.lang.String,java.lang.String> STRING_QUERY_MAKING_DECODER
TheMakingDecoder
used by standard queries.
-
-
Constructor Detail
-
Query
protected Query(ENCODES value, PercentEncodingPartial<ENCODES,java.lang.String> percentEncodingPartial)
Constructor for subclasses ofQuery
with scheme specific percent encoding of characters beyond that specified for generic URIQuery
s.- Parameters:
value
- the (non encoded) value this object represents.percentEncodingPartial
- thePercentEncodingPartial
this subclass will use.
-
-
Method Detail
-
query
public static Query<java.lang.String> query(java.lang.String query)
Factory method for creatingQuery
s.- Parameters:
query
- anyString
to represent as aQuery
.- Returns:
- a
Query
representing the givenString
.
-
stringQueryMaker
@Deprecated public static MakingDecoder<Query<java.lang.String>,java.lang.String,java.lang.String> stringQueryMaker()
Deprecated.useSTRING_QUERY_MAKING_DECODER
instead.Factory method forMakingDecoder
s ofString
Query
s.- Returns:
- a
MakingDecoder
ofString
Query
s.
-
value
public final ENCODES value()
Gets the (non-encoded) value of this query.- Returns:
- the (non-encoded) value of this query.
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-