Record Class PortalData

java.lang.Object
java.lang.Record
org.sgrewritten.stargate.network.portal.portaldata.PortalData
Record Components:
gateData - Data of the gate owned by this portal
name - The name of the portal.
networkName - The name of the network that the portal is associated with.
destination - The name of the portal stored as this portal's destination.
flags - A set containing all the flags associated with this portal.
ownerUUID - The UUID of the player who owns this portal.
serverUUID - The UUID of the server this portal was constructed on.
serverName - The name of the server this portal was constructed on.
portalType - The type associated with this portal.
metaData - The metadata on this portal

public record PortalData(GateData gateData, String name, String networkName, String destination, Set<PortalFlag> flags, UUID ownerUUID, String serverUUID, String serverName, StorageType portalType, String metaData) extends Record
The data contained within a Portal.
  • Constructor Details

    • PortalData

      public PortalData(GateData gateData, String name, String networkName, String destination, Set<PortalFlag> flags, UUID ownerUUID, String serverUUID, String serverName, StorageType portalType, String metaData)
      Creates an instance of a PortalData record class.
      Parameters:
      gateData - the value for the gateData record component
      name - the value for the name record component
      networkName - the value for the networkName record component
      destination - the value for the destination record component
      flags - the value for the flags record component
      ownerUUID - the value for the ownerUUID record component
      serverUUID - the value for the serverUUID record component
      serverName - the value for the serverName record component
      portalType - the value for the portalType record component
      metaData - the value for the metaData record component
  • Method Details

    • flagString

      public String flagString()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • gateData

      public GateData gateData()
      Returns the value of the gateData record component.
      Returns:
      the value of the gateData record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • networkName

      public String networkName()
      Returns the value of the networkName record component.
      Returns:
      the value of the networkName record component
    • destination

      public String destination()
      Returns the value of the destination record component.
      Returns:
      the value of the destination record component
    • flags

      public Set<PortalFlag> flags()
      Returns the value of the flags record component.
      Returns:
      the value of the flags record component
    • ownerUUID

      public UUID ownerUUID()
      Returns the value of the ownerUUID record component.
      Returns:
      the value of the ownerUUID record component
    • serverUUID

      public String serverUUID()
      Returns the value of the serverUUID record component.
      Returns:
      the value of the serverUUID record component
    • serverName

      public String serverName()
      Returns the value of the serverName record component.
      Returns:
      the value of the serverName record component
    • portalType

      public StorageType portalType()
      Returns the value of the portalType record component.
      Returns:
      the value of the portalType record component
    • metaData

      public String metaData()
      Returns the value of the metaData record component.
      Returns:
      the value of the metaData record component