- java.lang.Object
-
- net.sourceforge.urin.Fragment<ENCODES>
-
- Type Parameters:
ENCODES
- The type of value represented by the fragment -String
in the general case.
public class Fragment<ENCODES> extends java.lang.Object
A fragment component of a URI. Immutable and thread safe.- See Also:
- RFC 3986 - Fragment
-
-
Field Summary
Fields Modifier and Type Field Description static MakingDecoder<Fragment<java.lang.String>,java.lang.String,java.lang.String>
STRING_FRAGMENT_MAKING_DECODER
TheMakingDecoder
used by standard fragments.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Fragment(ENCODES value, PercentEncodingPartial<ENCODES,java.lang.String> percentEncodingPartial)
Constructor for subclasses ofFragment
with scheme specific percent encoding of characters beyond that specified for generic URIFragment
s.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
static Fragment<java.lang.String>
fragment(java.lang.String fragment)
Factory method for creatingFragment
s.int
hashCode()
static MakingDecoder<Fragment<java.lang.String>,java.lang.String,java.lang.String>
stringFragmentMaker()
Deprecated.useSTRING_FRAGMENT_MAKING_DECODER
insteadjava.lang.String
toString()
ENCODES
value()
Gets the (non-encoded) value of this fragment.
-
-
-
Field Detail
-
STRING_FRAGMENT_MAKING_DECODER
public static final MakingDecoder<Fragment<java.lang.String>,java.lang.String,java.lang.String> STRING_FRAGMENT_MAKING_DECODER
TheMakingDecoder
used by standard fragments.
-
-
Constructor Detail
-
Fragment
protected Fragment(ENCODES value, PercentEncodingPartial<ENCODES,java.lang.String> percentEncodingPartial)
Constructor for subclasses ofFragment
with scheme specific percent encoding of characters beyond that specified for generic URIFragment
s.- Parameters:
value
- the (non encoded) value this object represents.percentEncodingPartial
- thePercentEncodingPartial
this subclass will use.
-
-
Method Detail
-
fragment
public static Fragment<java.lang.String> fragment(java.lang.String fragment)
Factory method for creatingFragment
s.- Parameters:
fragment
- anyString
to represent as aFragment
.- Returns:
- a
Fragment
representing the givenString
.
-
stringFragmentMaker
@Deprecated public static MakingDecoder<Fragment<java.lang.String>,java.lang.String,java.lang.String> stringFragmentMaker()
Deprecated.useSTRING_FRAGMENT_MAKING_DECODER
insteadFactory method forMakingDecoder
s ofString
Fragment
s- Returns:
- a
MakingDecoder
ofString
Fragment
s
-
value
public final ENCODES value()
Gets the (non-encoded) value of this fragment.- Returns:
- the (non-encoded) value of this fragment.
-
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
-
-