Class DeploymentOrder

java.lang.Object
com.github.fungal.api.configuration.DeploymentOrder
All Implemented Interfaces:
Serializable, Comparator<URL>

public class DeploymentOrder extends Object implements Comparator<URL>, Serializable
DeploymentOrder defines the order of the deployment should be processed
Author:
Jesper Pedersen
See Also:
  • Constructor Details

    • DeploymentOrder

      public DeploymentOrder()
      .xml files will be first
    • DeploymentOrder

      public DeploymentOrder(List<String> extensions)
      User defined order
      Parameters:
      extensions - The order of the file extensions
  • Method Details

    • getOrder

      public List<String> getOrder()
      Get the order of the extensions
      Returns:
      The order
    • getOrderIndex

      public int getOrderIndex(URL url)
      Get the order index of an url
      Parameters:
      url - The URL
      Returns:
      The index; Integer.MAX_VALUE if not defined
    • compare

      public int compare(URL o1, URL o2)
      Compare
      Specified by:
      compare in interface Comparator<URL>
      Parameters:
      o1 - The first object
      o2 - The second object
      Returns:
      The files sorted according to the specified ordering; the rest according to their natural ordering
    • hashCode

      public int hashCode()
      Hash code
      Overrides:
      hashCode in class Object
      Returns:
      The hash
    • equals

      public boolean equals(Object o)
      Equals
      Specified by:
      equals in interface Comparator<URL>
      Overrides:
      equals in class Object
      Parameters:
      o - The object
      Returns:
      True if equal; otherwise false