Package api

Class PortalInfo


  • public class PortalInfo
    extends java.lang.Object
    Stores information about a portal for use when creating a Pearls grid from a string representation. See StringUtil#createFromStringArray. Portals are identified in a string representation by a pair of capital letters that subsequently have to be matched to calculate the offsets to the companion portal.
    Author:
    smkautz
    • Constructor Summary

      Constructors 
      Constructor Description
      PortalInfo​(char id, int row, int col)
      Constructs a PortalInfo object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCol()
      Returns the column for the portal.
      char getId()
      Returns the character identifying the portal.
      int getRow()
      Returns the row for the portal.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PortalInfo

        public PortalInfo​(char id,
                          int row,
                          int col)
        Constructs a PortalInfo object.
        Parameters:
        id - given id
        row - given row index
        col - given column index
    • Method Detail

      • getId

        public char getId()
        Returns the character identifying the portal.
        Returns:
        id for the portal
      • getRow

        public int getRow()
        Returns the row for the portal.
        Returns:
        row for the portal
      • getCol

        public int getCol()
        Returns the column for the portal. column for the portal
        Returns:
        column for the portal