org.eclipse.jetty.webapp

## Class Ordering.RelativeOrdering

- java.lang.Object
- - org.eclipse.jetty.webapp.Ordering.RelativeOrdering

- All Implemented Interfaces:
    Ordering
  Enclosing interface:
    Ordering

      public static class Ordering.RelativeOrdering
      extends Object
      implements Ordering

  RelativeOrdering A set of <order> elements in web-fragment.xmls.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.jetty.webapp.Ordering

      `Ordering.AbsoluteOrdering, Ordering.RelativeOrdering`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected LinkedList<Resource>` | `_afterOthers`
    `protected LinkedList<Resource>` | `_beforeOthers`
    `protected MetaData` | `_metaData`
    `protected LinkedList<Resource>` | `_noOthers`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Ordering.RelativeOrdering(MetaData metaData)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAfterOthers(Resource r)`
    `void` | `addBeforeOthers(Resource r)`
    `void` | `addNoOthers(Resource r)`
    `protected int` | `getIndexOf(List<Resource> resources, String fragmentName)`
    `boolean` | `hasOther()`
    `protected void` | `insert(List<Resource> list, int index, Resource resource)`
    `protected void` | `insert(List<Resource> list, int index, String fragName)` Insert the resource matching the fragName into the list of resources at the location indicated by index.
    `boolean` | `isAbsolute()`
    `protected boolean` | `isAfter(List<Resource> list, String fragNameA, String fragNameB)` Is fragment name "a" after fragment name "b"?
    `protected boolean` | `isBefore(List<Resource> list, String fragNameA, String fragNameB)` Is fragment with name a before fragment with name b?
    `List<Resource>` | `order(List<Resource> jars)` Order the list of jars according to the ordering declared in the various web-fragment.xml files.
    `protected boolean` | `orderList(LinkedList<Resource> list)`
    `protected void` | `remove(List<Resource> resources, Resource r)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### _metaData

          protected MetaData _metaData

    - #### _beforeOthers

          protected LinkedList<Resource> _beforeOthers

    - #### _afterOthers

          protected LinkedList<Resource> _afterOthers

    - #### _noOthers

          protected LinkedList<Resource> _noOthers

  - ### Constructor Detail

    - #### Ordering.RelativeOrdering

          public Ordering.RelativeOrdering(MetaData metaData)

  - ### Method Detail

    - #### order

          public List<Resource> order(List<Resource> jars)

      Order the list of jars according to the ordering declared in the various web-fragment.xml files.
      Specified by:
        `order` in interface `Ordering`
      See Also:
        `Ordering.order(java.util.List)`

    - #### isAbsolute

          public boolean isAbsolute()

      Specified by:
        `isAbsolute` in interface `Ordering`

    - #### hasOther

          public boolean hasOther()

      Specified by:
        `hasOther` in interface `Ordering`

    - #### addBeforeOthers

          public void addBeforeOthers(Resource r)

    - #### addAfterOthers

          public void addAfterOthers(Resource r)

    - #### addNoOthers

          public void addNoOthers(Resource r)

    - #### orderList

          protected boolean orderList(LinkedList<Resource> list)

    - #### isBefore

          protected boolean isBefore(List<Resource> list,
                         String fragNameA,
                         String fragNameB)

      Is fragment with name a before fragment with name b?
      Parameters:
        `list` -
        `fragNameA` -
        `fragNameB` -
      Returns:
        true if fragment name A is before fragment name B

    - #### isAfter

          protected boolean isAfter(List<Resource> list,
                        String fragNameA,
                        String fragNameB)

      Is fragment name "a" after fragment name "b"?
      Parameters:
        `list` -
        `fragNameA` -
        `fragNameB` -
      Returns:
        true if fragment name A is after fragment name B

    - #### insert

          protected void insert(List<Resource> list,
                    int index,
                    String fragName)

      Insert the resource matching the fragName into the list of resources at the location indicated by index.
      Parameters:
        `list` -
        `index` -
        `fragName` -

    - #### insert

          protected void insert(List<Resource> list,
                    int index,
                    Resource resource)

    - #### remove

          protected void remove(List<Resource> resources,
                    Resource r)

    - #### getIndexOf

          protected int getIndexOf(List<Resource> resources,
                       String fragmentName)

Copyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.