From 278bfc319cc905bdf150af814bb3461896b68444 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 25 Oct 2015 13:35:25 -0400 Subject: Add version 1.3.1 site. --- .../com/tavianator/sangria/core/Priority.html | 404 +++++++++++++++++++++ 1 file changed, 404 insertions(+) create mode 100644 1.3.1/apidocs/com/tavianator/sangria/core/Priority.html (limited to '1.3.1/apidocs/com/tavianator/sangria/core/Priority.html') diff --git a/1.3.1/apidocs/com/tavianator/sangria/core/Priority.html b/1.3.1/apidocs/com/tavianator/sangria/core/Priority.html new file mode 100644 index 0000000..e8421cb --- /dev/null +++ b/1.3.1/apidocs/com/tavianator/sangria/core/Priority.html @@ -0,0 +1,404 @@ + + + + + + +Priority (Sangria 1.3.1 API) + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.tavianator.sangria.core
+

Class Priority

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    Comparable<Priority>
    +
    +
    +
    +
    public class Priority
    +extends Object
    +implements Comparable<Priority>
    +
    A loosely-coupled, infinitely divisible priority/weight system. + +

    + This class implements an extensible priority system based on lexicographical ordering. In its simplest use, Priority.create(0) is ordered before Priority.create(1), then Priority.create(2), etc. +

    + +

    + To create a priority that is ordered between two existing ones, simply add another parameter: Priority.create(1, 1) comes after Priority.create(1), but before Priority.create(2). In this way, + priorities can always be inserted anywhere in a sequence. +

    + +

    + The next() method creates a priority that is ordered immediately following the current one, and is distinct + from all priorities obtained by any other means. This provides a convenient way to order entire segments of lists. +

    + +

    + A special priority, obtained by Priority.getDefault(), sorts before all other priorities. +

    +
    +
    Since:
    +
    1.1
    +
    Version:
    +
    1.1
    +
    Author:
    +
    Tavian Barnes (tavianator@tavianator.com)
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getDefault

        +
        public static Priority getDefault()
        +
        +
        Returns:
        +
        The default priority, which comes before all other priorities.
        +
        +
      • +
      + + + +
        +
      • +

        create

        +
        public static Priority create(int weight,
        +                              int... weights)
        +
        Create a Priority with the given sequence.
        +
        +
        Parameters:
        +
        weight - The first value of the weight sequence.
        +
        weights - An integer sequence. These sequences are sorted lexicographically, so Priority.create(1) + sorts before Priority.create(1, 1), which sorts before Priority.create(2).
        +
        Returns:
        +
        A new Priority.
        +
        +
      • +
      + + + +
        +
      • +

        isDefault

        +
        public boolean isDefault()
        +
        +
        Returns:
        +
        Whether this priority originated in a call to getDefault().
        +
        +
      • +
      + + + +
        +
      • +

        next

        +
        public Priority next()
        +
        +
        Returns:
        +
        A new Priority which immediately follows this one, and which is distinct from all other + priorities obtained by create(int, int...).
        +
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals(Object obj)
        +
        +
        Overrides:
        +
        equals in class Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class Object
        +
        +
      • +
      + + + + + + + + +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + +

Copyright © 2014–2015. All rights reserved.

+ + -- cgit v1.2.3