Interface Location


public interface Location

Shape of the value for addLocation and removeLocation actions


Example to create an instance using the builder pattern

     Location location = Location.builder()
             .country("{country}")
             .state("{state}")
             .build()
 
  • Method Details

    • getCountry

      @NotNull @NotNull String getCountry()

      Two-digit country code as per ISO 3166-1 alpha-2.

      Returns:
      country
    • getState

      @NotNull @NotNull String getState()
      Returns:
      state
    • setCountry

      void setCountry(String country)

      Two-digit country code as per ISO 3166-1 alpha-2.

      Parameters:
      country - value to be set
    • setState

      void setState(String state)
      set state
      Parameters:
      state - value to be set
    • of

      static Location of()
      factory method
      Returns:
      instance of Location
    • of

      static Location of(Location template)
      factory method to create a shallow copy Location
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static Location deepCopy(@Nullable Location template)
      factory method to create a deep copy of Location
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static LocationBuilder builder()
      builder factory method for Location
      Returns:
      builder
    • builder

      static LocationBuilder builder(Location template)
      create builder for Location instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withLocation

      default <T> T withLocation(Function<Location,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<Location> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference