Class 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 Detail

      • STRING_FRAGMENT_MAKING_DECODER

        public static final MakingDecoder<Fragment<java.lang.String>,​java.lang.String,​java.lang.String> STRING_FRAGMENT_MAKING_DECODER
        The MakingDecoder used by standard fragments.
    • Constructor Detail

      • Fragment

        protected Fragment​(ENCODES value,
                           PercentEncodingPartial<ENCODES,​java.lang.String> percentEncodingPartial)
        Constructor for subclasses of Fragment with scheme specific percent encoding of characters beyond that specified for generic URI Fragments.
        Parameters:
        value - the (non encoded) value this object represents.
        percentEncodingPartial - the PercentEncodingPartial this subclass will use.
    • Method Detail

      • fragment

        public static Fragment<java.lang.String> fragment​(java.lang.String fragment)
        Factory method for creating Fragments.
        Parameters:
        fragment - any String to represent as a Fragment.
        Returns:
        a Fragment representing the given String.
      • stringFragmentMaker

        @Deprecated
        public static MakingDecoder<Fragment<java.lang.String>,​java.lang.String,​java.lang.String> stringFragmentMaker()
        Deprecated.
        Factory method for MakingDecoders of String Fragments
        Returns:
        a MakingDecoder of String Fragments
      • 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 class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object