Interface Location


public interface Location

A geographical location representing a country and optionally a state within this country. A location can only be assigned to one Zone.


Example to create an instance using the builder pattern

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

    • getCountry

      @NotNull @NotNull String getCountry()

      Country code of the geographic location.

      Returns:
      country
    • getState

      String getState()

      State within the country.

      Returns:
      state
    • setCountry

      void setCountry(String country)

      Country code of the geographic location.

      Parameters:
      country - value to be set
    • setState

      void setState(String state)

      State within the country.

      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