Class DefaultPathVariables

    • Field Summary

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean exists​(java.lang.String name)
      Returns if the path variable by the name given exists.
      java.util.OptionalDouble getDouble​(java.lang.String name)
      Returns the path variable as double type by the name given.
      java.util.OptionalInt getInt​(java.lang.String name)
      Returns the path variable as int type by the name given.
      java.util.OptionalLong getLong​(java.lang.String name)
      Returns the path variable as long type by the name given.
      java.util.Optional<java.lang.String> getString​(java.lang.String name)
      Returns the path variable by the name given.
      java.util.Collection<java.lang.String> names()
      Returns a collection contains of the names of all path variables.
      void put​(java.lang.String name, java.lang.String value)
      Puts a path variable by the specified name and value.
      int size()
      Returns the size of the path variables.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultPathVariables

        public DefaultPathVariables​(java.util.Map<java.lang.String,​java.lang.String> map)
        Constructs a new DefaultPathVariables with the given map.
        Parameters:
        map - a key-value map constants the path variables
    • Method Detail

      • put

        public void put​(java.lang.String name,
                        java.lang.String value)
        Puts a path variable by the specified name and value.
        Parameters:
        name - the name of the path variable
        value - the value string of the path variable
      • getString

        public java.util.Optional<java.lang.String> getString​(java.lang.String name)
        Description copied from interface: PathVariables
        Returns the path variable by the name given.
        Specified by:
        getString in interface PathVariables
        Parameters:
        name - the name of the path variable
        Returns:
        Optional<String>
      • getInt

        public java.util.OptionalInt getInt​(java.lang.String name)
        Description copied from interface: PathVariables
        Returns the path variable as int type by the name given.
        Specified by:
        getInt in interface PathVariables
        Parameters:
        name - the name of the path variable
        Returns:
        OptionalInt
      • getLong

        public java.util.OptionalLong getLong​(java.lang.String name)
        Description copied from interface: PathVariables
        Returns the path variable as long type by the name given.
        Specified by:
        getLong in interface PathVariables
        Parameters:
        name - the name of the path variable
        Returns:
        OptionalLong
      • getDouble

        public java.util.OptionalDouble getDouble​(java.lang.String name)
        Description copied from interface: PathVariables
        Returns the path variable as double type by the name given.
        Specified by:
        getDouble in interface PathVariables
        Parameters:
        name - the name of the path variable
        Returns:
        OptionalDouble
      • exists

        public boolean exists​(java.lang.String name)
        Description copied from interface: PathVariables
        Returns if the path variable by the name given exists.
        Specified by:
        exists in interface PathVariables
        Parameters:
        name - the name of the path variable
        Returns:
        true if the path variable by the name given exists, false otherwise
      • size

        public int size()
        Description copied from interface: PathVariables
        Returns the size of the path variables.
        Specified by:
        size in interface PathVariables
        Returns:
        the size of the path variables
      • names

        public java.util.Collection<java.lang.String> names()
        Description copied from interface: PathVariables
        Returns a collection contains of the names of all path variables.
        Specified by:
        names in interface PathVariables
        Returns:
        a collection contains of the names of all path variables