Class ShrinkMapSizeUtils


  • public class ShrinkMapSizeUtils
    extends java.lang.Object
    Utility class to remove empty squares from a map's border.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int SHRINK_EAST
      Flag value: remove empty space from east border.
      static int SHRINK_SOUTH
      Flag value: remove empty space from south border.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int getShrinkFlags​(@NotNull MapModel<?,​?,​?> mapModel)
      Returns which borders contain empty squares.
      static void shrinkMap​(@NotNull MapModel<?,​?,​?> mapModel, int shrinkFlags)
      Removes empty squares from a map's border.
      • Methods inherited from class java.lang.Object

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

      • SHRINK_EAST

        public static final int SHRINK_EAST
        Flag value: remove empty space from east border.
        See Also:
        Constant Field Values
      • SHRINK_SOUTH

        public static final int SHRINK_SOUTH
        Flag value: remove empty space from south border.
        See Also:
        Constant Field Values
    • Method Detail

      • shrinkMap

        public static void shrinkMap​(@NotNull
                                     @NotNull MapModel<?,​?,​?> mapModel,
                                     int shrinkFlags)
        Removes empty squares from a map's border.
        Parameters:
        mapModel - the map to modify
        shrinkFlags - the borders to modify
      • getShrinkFlags

        public static int getShrinkFlags​(@NotNull
                                         @NotNull MapModel<?,​?,​?> mapModel)
        Returns which borders contain empty squares.
        Parameters:
        mapModel - the map to check
        Returns:
        the borders having empty squares