Package org.tweetyproject.comparator
Class Order<T>
java.lang.Object
org.tweetyproject.comparator.Order<T>
- Type Parameters:
T
- The class that is being ordered.
This class represents an order among some objects.
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorDescriptionOrder
(Collection<T> objects) Creates a new order for the given set of objects. -
Method Summary
Modifier and TypeMethodDescriptionDefaultGraph
<Order<T>.org.tweetyproject.comparator.Order.OrderNode> Return the directed defaultGraph that represents the orderReturns the elements appearing in this order.getNodes()
Return the bijection between objects and nodes in the defaultGraphboolean
isComparable
(T object1, T object2) Return whether the objects are comparableboolean
isOrderedBefore
(T object1, T object2) Checks whether object1 is ordered before object2.void
removeNode
(T n) Removes the given node and all of its relations.void
setOrderedBefore
(T object1, T object2) Adds that object1 is ordered before object2toString()
-
Constructor Details
-
Order
Creates a new order for the given set of objects.- Parameters:
objects
- some set of objects.
-
-
Method Details
-
removeNode
Removes the given node and all of its relations.- Parameters:
n
- The object whose node will be removed
-
setOrderedBefore
-
isOrderedBefore
-
isComparable
-
getElements
Returns the elements appearing in this order.- Returns:
- the elements appearing in this order.
-
toString
-
getDefaultGraph
Return the directed defaultGraph that represents the order- Returns:
- the directed defaultGraph that represents the order
-
getNodes
-