Package org.intermine.pathquery
Class OrderElement
- java.lang.Object
-
- org.intermine.pathquery.OrderElement
-
public class OrderElement extends java.lang.Object
An element of the order by list of a PathQuery, containing a path and a direction. This class is immutable.- Author:
- Matthew Wakeling
-
-
Constructor Summary
Constructors Constructor Description OrderElement(java.lang.String orderPath, OrderDirection direction)
Constructor, taking a path and a direction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
OrderDirection
getDirection()
Returns the order direction of this OrderElement.java.lang.String
getOrderPath()
Returns the path of this OrderElement.int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
OrderElement
public OrderElement(java.lang.String orderPath, OrderDirection direction)
Constructor, taking a path and a direction. The path should be a normal path expression with dots separating the parts. Do not use colons to represent outer joins, and do not use square brackets to represent subclass constraints. The path will be checked for format.- Parameters:
orderPath
- the path to order bydirection
- the direction to order in- Throws:
java.lang.NullPointerException
- if orderPath or direction are nulljava.lang.IllegalArgumentException
- if the orderPath contains colons or square brackets, or is otherwise in a bad format
-
-
Method Detail
-
getOrderPath
public java.lang.String getOrderPath()
Returns the path of this OrderElement.- Returns:
- a String path
-
getDirection
public OrderDirection getDirection()
Returns the order direction of this OrderElement.- Returns:
- an OrderDirection
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-