Class Poi.Builder

  • Enclosing class:
    Poi

    public static final class Poi.Builder
    extends java.lang.Object
    Builder to create a Poi instances
    • Constructor Detail

      • Builder

        public Builder​(Poi toCopy)
      • Builder

        public Builder​(@NonNull
                       Point position)
      • Builder

        public Builder​(@NonNull
                       java.lang.String buildingIdentifier,
                       @NonNull
                       Coordinate coordinate)
        Creates a Builder for outdoor POI
        Parameters:
        buildingIdentifier - Identifier of building to which POI belongs.
        coordinate - Not null. Geographical coordinate of this position.
        Throws:
        java.lang.IllegalArgumentException - when buildingIdentifier and/or coordinate are null.
      • Builder

        public Builder​(@NonNull
                       java.lang.String buildingIdentifier,
                       @NonNull
                       java.lang.String floorIdentifier,
                       @NonNull
                       Coordinate coordinate,
                       @NonNull
                       CartesianCoordinate cartesianCoordinate)
        Creates a Builder for indoor POI.
        Parameters:
        buildingIdentifier - Identifier of building to which POI belongs.
        floorIdentifier - Identifier of building's level, where the position is.
        coordinate - Geographical coordinate of this position.
        cartesianCoordinate - Cartesian coordinate of this position.
        Throws:
        java.lang.IllegalArgumentException - when some of the params is null.
    • Method Detail

      • name

        @NonNull
        public Poi.Builder name​(@NonNull
                                java.lang.String name)
        Parameters:
        name - a name for the POI, appropriate for display to the user.
        Returns:
        current Poi.Builder instance
      • infoHtml

        @NonNull
        public Poi.Builder infoHtml​(@NonNull
                                    java.lang.String infoHtml)
        Parameters:
        infoHtml - additional information about POI, in HTML.
        Returns:
        current Poi.Builder instance
      • category

        @NonNull
        public Poi.Builder category​(@NonNull
                                    PoiCategory category)
        Parameters:
        category - category of the POI
        Returns:
        current Poi.Builder instance
      • categoryIdentifier

        @NonNull
        public Poi.Builder categoryIdentifier​(@NonNull
                                              java.lang.String categoryIdentifier)
        Set the identifier of the category this POI belongs to. Note: The coherence between category identifier and category object is your responsibility.
        Parameters:
        categoryIdentifier - The identifier.
        Returns:
        current Poi.Builder instance
      • categories

        @NonNull
        public Poi.Builder categories​(@NonNull
                                      java.util.Collection<PoiCategory> categories)
        Parameters:
        categories - categories of the POI
        Returns:
        current Poi.Builder instance
      • categoryIdentifiers

        @NonNull
        public Poi.Builder categoryIdentifiers​(@NonNull
                                               java.util.Collection<java.lang.String> categoryIdentifiers)
        Set the identifier of the category this POI belongs to. Note: The coherence between category identifiers and category objects is your responsibility.
        Parameters:
        categoryIdentifiers - The identifiers.
        Returns:
        current Poi.Builder instance
      • build

        @NonNull
        public Poi build()
        Returns:
        new Poi instance