Class ReplaceUtils


  • public class ReplaceUtils
    extends java.lang.Object
    Utility class to replace objects in a map.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>
      int
      replace​(@NotNull MatchCriteria<G,​A,​R> matchCriteria, boolean entireMap, boolean deleteOnly, int replaceDensity, @NotNull MapView<G,​A,​R> mapView, @NotNull InsertionModeSet<G,​A,​R> insertionModeSet, @Nullable java.util.List<? extends BaseObject<G,​A,​R,​?>> replaceList)
      This method performs the actual replace action on a map.
      • Methods inherited from class java.lang.Object

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

      • replace

        public static <G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>> int replace​(@NotNull
                                                                                                                                                          @NotNull MatchCriteria<G,​A,​R> matchCriteria,
                                                                                                                                                          boolean entireMap,
                                                                                                                                                          boolean deleteOnly,
                                                                                                                                                          int replaceDensity,
                                                                                                                                                          @NotNull
                                                                                                                                                          @NotNull MapView<G,​A,​R> mapView,
                                                                                                                                                          @NotNull
                                                                                                                                                          @NotNull InsertionModeSet<G,​A,​R> insertionModeSet,
                                                                                                                                                          @Nullable
                                                                                                                                                          @Nullable java.util.List<? extends BaseObject<G,​A,​R,​?>> replaceList)
        This method performs the actual replace action on a map.
        Parameters:
        matchCriteria - matching criteria for replace
        entireMap - if true, the entire map is affected - if false, only highlighted area
        deleteOnly - if true matching arches get only deleted and not replaced
        replaceDensity - the replace density in %
        Returns:
        number of arches that have been replaced