Class JobSortSetting

java.lang.Object
gg.xp.xivsupport.persistence.settings.JobSortSetting
Direct Known Subclasses:
JobSortOverrideSetting

public class JobSortSetting extends Object
Setting to hold an ordered list of jobs, typically used for job priority kind of stuff.
  • Constructor Details

  • Method Details

    • getComparator

      public Comparator<XivPlayerCharacter> getComparator()
      Returns:
      A comparator which can be used to sort a list of players according to their jobs
    • getPlayerJailSortComparator

      @Deprecated public Comparator<XivPlayerCharacter> getPlayerJailSortComparator()
      Deprecated.
      Deprecated, use getComparator()
      Returns:
      A comparator which can be used to sort a list of players according to their jobs
    • getJobOrder

      public List<Job> getJobOrder()
      Returns:
      The current job sort order
    • getCurrentJailSort

      @Deprecated public List<Job> getCurrentJailSort()
      Deprecated.
      Deprecated, use getJobOrder()
      Returns:
      The current job sort order
    • resetJobOrder

      public void resetJobOrder()
      Reset the job order to the default
    • getDefaultSort

      protected Comparator<Job> getDefaultSort()
    • resetJailSort

      @Deprecated public void resetJailSort()
      Deprecated.
      Deprecated, see resetJobOrder()
    • isSet

      public boolean isSet()
      Returns:
      Whether or not this setting has actually been set by the user, or if it is using default values.
    • validateJobSortOrder

      public void validateJobSortOrder(List<Job> newSort)
    • setJobOrder

      public void setJobOrder(List<Job> newSort)
      Set a new job order
      Parameters:
      newSort - The new job order. MUST contain EVERY JOB. If you wish to only supply some jobs, see setJobOrderPartial(List)
    • setJailSort

      @Deprecated public void setJailSort(List<Job> newSort)
      Deprecated.
      Deprecated, use setJobOrder(List)
      Parameters:
      newSort - The new job order. MUST contain EVERY JOB. If you wish to only supply some jobs, see setJobOrderPartial(List)
    • setJobOrderPartial

      public void setJobOrderPartial(List<Job> partial)
      Like setJobOrder(List), but does not require you to have every single combat job in your list.

      In the event that you do not specify all jobs, they will be appended to the end of the list in whatever order they currently appear.

      Parameters:
      partial - The list of jobs. May be non-exhaustive.
    • partyOrderPreview

      public List<XivPlayerCharacter> partyOrderPreview()
      Returns:
      The current party list, sorted by this job priority.