Class Regions


  • public class Regions
    extends java.lang.Object
    Set of regions.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String defaultNetid
      Default network
      java.util.ArrayList<java.lang.String> netids
      Array of network ids, e.g.
      java.util.ArrayList<Region> regions
      Array of regions
    • Constructor Summary

      Constructors 
      Constructor Description
      Regions()
      Create a new set of regions.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isAuthor​(EQEvent eq)
      Determines if the event is from the authoritative network.
      boolean isAuthor​(java.lang.String netid, Point p)
      Determines if the event is from the authoritative network.
      boolean isDefaultNetID​(EQEvent eq)
      Checks if an event's network ID is the default network.
      boolean isDefaultNetID​(java.lang.String netid)
      Checks if network ID is the default network.
      boolean isValidnetID​(java.lang.String netid)
      Is this netid in the set of regions? The default net covers the whole world so it is always valid since it has no finite boundaries.
      • Methods inherited from class java.lang.Object

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

      • defaultNetid

        public java.lang.String defaultNetid
        Default network
      • netids

        public java.util.ArrayList<java.lang.String> netids
        Array of network ids, e.g. nc, us, etc.
      • regions

        public java.util.ArrayList<Region> regions
        Array of regions
    • Constructor Detail

      • Regions

        public Regions()
        Create a new set of regions.
    • Method Detail

      • isValidnetID

        public boolean isValidnetID​(java.lang.String netid)
        Is this netid in the set of regions? The default net covers the whole world so it is always valid since it has no finite boundaries.
        Parameters:
        netid - A netid (nc, us, etc.)
        Returns:
        boolean if netid is valid
      • isDefaultNetID

        public boolean isDefaultNetID​(java.lang.String netid)
        Checks if network ID is the default network.
        Parameters:
        netid - network ID
        Returns:
        true if default network.
      • isDefaultNetID

        public boolean isDefaultNetID​(EQEvent eq)
        Checks if an event's network ID is the default network.
        Parameters:
        eq - EQ event
        Returns:
        true if default network.
      • isAuthor

        public boolean isAuthor​(java.lang.String netid,
                                Point p)
        Determines if the event is from the authoritative network.
        Parameters:
        netid - network ID
        p - event point
        Returns:
        true if event is authoritative
      • isAuthor

        public boolean isAuthor​(EQEvent eq)
        Determines if the event is from the authoritative network.
        Parameters:
        eq - EQ event
        Returns:
        true if event is authoritative