Interface PathVariables

  • All Known Implementing Classes:
    DefaultPathVariables

    public interface PathVariables
    Provides methods to access path variables from an HTTP path.
    Since:
    1.1
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static PathVariables EMPTY
      Deprecated.
      please use empty() instead since 2.0
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      static PathVariables empty()
      Returns the empty PathVariables instances.
      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.
      int size()
      Returns the size of the path variables.
    • Field Detail

      • EMPTY

        @Deprecated
        static final PathVariables EMPTY
        Deprecated.
        please use empty() instead since 2.0
    • Method Detail

      • empty

        static PathVariables empty()
        Returns the empty PathVariables instances.
        Returns:
        the empty PathVariables instances
        Since:
        2.0
      • getString

        java.util.Optional<java.lang.String> getString​(java.lang.String name)
        Returns the path variable by the name given.
        Parameters:
        name - the name of the path variable
        Returns:
        Optional<String>
      • getInt

        java.util.OptionalInt getInt​(java.lang.String name)
        Returns the path variable as int type by the name given.
        Parameters:
        name - the name of the path variable
        Returns:
        OptionalInt
      • getLong

        java.util.OptionalLong getLong​(java.lang.String name)
        Returns the path variable as long type by the name given.
        Parameters:
        name - the name of the path variable
        Returns:
        OptionalLong
      • getDouble

        java.util.OptionalDouble getDouble​(java.lang.String name)
        Returns the path variable as double type by the name given.
        Parameters:
        name - the name of the path variable
        Returns:
        OptionalDouble
      • exists

        boolean exists​(java.lang.String name)
        Returns if the path variable by the name given exists.
        Parameters:
        name - the name of the path variable
        Returns:
        true if the path variable by the name given exists, false otherwise
      • size

        int size()
        Returns the size of the path variables.
        Returns:
        the size of the path variables
      • names

        java.util.Collection<java.lang.String> names()
        Returns a collection contains of the names of all path variables.
        Returns:
        a collection contains of the names of all path variables