Interface Shares

All Superinterfaces:
Cloneable, Collection<Sharable>, Iterable<Sharable>, Set<Sharable>
All Known Implementing Classes:
Sharables

public interface Shares extends Cloneable, Iterable<Sharable>, Collection<Sharable>, Set<Sharable>
Interface for getting what is shared in a world player.
  • Method Details

    • mergeShares

      void mergeShares(Shares newShares)
      Merges what is shared with another share. Only the false items should be merged.
      Parameters:
      newShares - The set of shares to merge into this set of shares.
    • isSharing

      boolean isSharing(Sharable sharable)
      Parameters:
      sharable - The Sharable you want to check for.
      Returns:
      True if it is sharing the sharable.
    • isSharing

      boolean isSharing(Shares shares)
      Parameters:
      shares - Shares to compare with.
      Returns:
      True if it is sharing the same sharables.
    • compare

      Shares compare(Shares shares)
      Checks to see if any of the sharables passed in are shared by this Shares.
      Parameters:
      shares - Shares to check for.
      Returns:
      A Set containing all of the Sharables both sets contain.
    • setSharing

      Shares setSharing(Sharable sharable, boolean sharing)
      Parameters:
      sharable - The Sharable you wish to set sharing for.
      sharing - Whether to share or not.
    • setSharing

      Shares setSharing(Shares sharables, boolean sharing)
      Parameters:
      sharables - a Set of Sharables you wish to set sharing for.
      sharing - Whether to share or not.
    • toStringList

      List<String> toStringList()
      Returns:
      These shares as a string list.