org.richfaces.resource.optimizer.ordering

## Class PartialOrderToCompleteOrder<T>

- java.lang.Object
- - org.richfaces.resource.optimizer.ordering.PartialOrderToCompleteOrder<T>

-     public class PartialOrderToCompleteOrder<T>
      extends Object

  Stores partial orderings in order to be able derive complete ordering.

  When storing new partial ordering, checks that new partial ordering does not violates partial orderings stored before.

  Author:
    Lukas Fryc

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `PartialOrderToCompleteOrder.CompleteOrdering` Class representing result of deriving complete ordering from stored partial orderings.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PartialOrderToCompleteOrder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPartialOrdering(Collection<T> collection)` Stores collection as partial ordering.
    `Set<T>` | `getAllItems()` Provides all items which was stored in collections as partial orderings
    `Collection<T>` | `getCompletelyOrderedItems()` Get all items completely ordered.
    `PartialOrderToCompleteOrder.CompleteOrdering` | `getCompleteOrdering()` Provides current complete ordering derived from partial orderings.

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

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

- - ### Constructor Detail

    - #### PartialOrderToCompleteOrder

          public PartialOrderToCompleteOrder()

  - ### Method Detail

    - #### addPartialOrdering

          public void addPartialOrdering(Collection<T> collection)

      Stores collection as partial ordering.

      Checks that this collection will not violate another partial orderings stored before.

      Parameters:
        `collection` - as partial order

    - #### getAllItems

          public Set<T> getAllItems()

      Provides all items which was stored in collections as partial orderings
      Returns:
        all items which was stored in collections as partial orderings

    - #### getCompleteOrdering

          public PartialOrderToCompleteOrder.CompleteOrdering getCompleteOrdering()

      Provides current complete ordering derived from partial orderings.

      Returns:
        current complete ordering derived from partial orderings.

    - #### getCompletelyOrderedItems

          public Collection<T> getCompletelyOrderedItems()

      Get all items completely ordered.
      Returns:
        all items completely ordered.

Copyright © 2014 JBoss by Red Hat. All Rights Reserved.