Class ProfileDataSnapshot

java.lang.Object
org.mvplugins.multiverse.inventories.profile.data.ProfileDataSnapshot
All Implemented Interfaces:
Cloneable, ProfileData
Direct Known Subclasses:
PlayerProfile

public sealed class ProfileDataSnapshot extends Object implements Cloneable, ProfileData permits PlayerProfile
  • Constructor Details

    • ProfileDataSnapshot

      public ProfileDataSnapshot()
  • Method Details

    • get

      public <T> T get(Sharable<T> sharable)
      Description copied from interface: ProfileData
      Retrieves the profile's value of the Sharable passed in.
      Specified by:
      get in interface ProfileData
      Type Parameters:
      T - This indicates the type of return value to be expected.
      Parameters:
      sharable - Represents the key for the data wanted from the profile.
      Returns:
      The value of the sharable for this profile. Null if no value is set.
    • set

      public <T> void set(Sharable<T> sharable, T value)
      Description copied from interface: ProfileData
      Sets the profile's value for the Sharable passed in.
      Specified by:
      set in interface ProfileData
      Type Parameters:
      T - The type of value to be expected.
      Parameters:
      sharable - Represents the key for the data to store.
      value - The value of the data.
    • getData

      public Map<Sharable,Object> getData()
      Specified by:
      getData in interface ProfileData
    • update

      public void update(ProfileData snapshot)
      Description copied from interface: ProfileData
      Updates this profile with the data from another profile data.
      Specified by:
      update in interface ProfileData
      Parameters:
      snapshot - The snapshot data to update from.
    • update

      public void update(ProfileData snapshot, Shares shares)
      Description copied from interface: ProfileData
      Updates this profile with the data from another profile data for a specific set of Sharables.
      Specified by:
      update in interface ProfileData
      Parameters:
      snapshot - The snapshot data to update from.
      shares - The set of Sharables to update.
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: ProfileData
      Checks whether this profile contains any data.
      Specified by:
      isEmpty in interface ProfileData
      Returns:
      True if the profile is empty.
    • clone

      public ProfileDataSnapshot clone()
      Overrides:
      clone in class Object