Class PrefixMapImpl

  • All Implemented Interfaces:
    PrefixMap, Serializable, scala.Equals, scala.Product

    public class PrefixMapImpl
    extends Object
    implements PrefixMap, scala.Product, Serializable
    An object of this class is a map of URI prefixes. This implementation iterates on the keys keeping the order in which they were added for the first time.

    See Also:
    Serialized Form
    • Constructor Detail

      • PrefixMapImpl

        public PrefixMapImpl​(scala.collection.immutable.Map<URI,​URI> prefixMap,
                             scala.collection.immutable.Seq<URI> keyList)
    • Method Detail

      • PrefixAmpersand

        public final String PrefixAmpersand()
        Description copied from interface: PrefixMap
        Start of the prefix.
        Specified by:
        PrefixAmpersand in interface PrefixMap
        Returns:
        (undocumented)
      • PrefixSemicolon

        public final String PrefixSemicolon()
        Description copied from interface: PrefixMap
        End of the prefix.
        Specified by:
        PrefixSemicolon in interface PrefixMap
        Returns:
        (undocumented)
      • prefixMap

        public scala.collection.immutable.Map<URI,​URI> prefixMap()
      • keyList

        public scala.collection.immutable.Seq<URI> keyList()
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: PrefixMap
        Returns true if and only if this map does not contain associations.

        Specified by:
        isEmpty in interface PrefixMap
        Returns:
        true if and only if this map does not contain associations
      • size

        public int size()
        Description copied from interface: PrefixMap
        Returns the size of this prefix map.

        Specified by:
        size in interface PrefixMap
        Returns:
        the size of this prefix map
      • getWithoutPrefix

        public URI getWithoutPrefix​(URI uri)
        Description copied from interface: PrefixMap
        Returns a URI without the prefix, i.e. with the prefix already expanded.

        Specified by:
        getWithoutPrefix in interface PrefixMap
        Parameters:
        uri - uri
        Returns:
        a URI without the prefix
      • getWithPrefix

        public URI getWithPrefix​(URI uri)
        Description copied from interface: PrefixMap
        Returns a URI with the prefix, i.e. a shortened URI.

        Specified by:
        getWithPrefix in interface PrefixMap
        Parameters:
        uri - URI
        Returns:
        a URI with the prefix
      • get

        public scala.Option<URI> get​(URI key)
        Description copied from interface: PrefixMap
        Returns the expansion for the given prefix.

        Specified by:
        get in interface PrefixMap
        Parameters:
        key - the prefix
        Returns:
        expansion for the given prefix
      • getPrefixFor

        public scala.Option<URI> getPrefixFor​(URI uri)
        Description copied from interface: PrefixMap
        Returns an optional with the prefix for the given URI, or empty if there is none.

        Specified by:
        getPrefixFor in interface PrefixMap
        Parameters:
        uri - URI
        Returns:
        an optional with the prefix for the given URI, or empty if there is none
      • getKeys

        public scala.collection.immutable.Seq<URI> getKeys()
        Description copied from interface: PrefixMap
        Returns a sequence to iterate on the keys.

        Specified by:
        getKeys in interface PrefixMap
        Returns:
        a sequence to iterate on the keys