edu.isi.pegasus.planner.ranking

## Class Ranking

- java.lang.Object
- - edu.isi.pegasus.planner.ranking.Ranking

All Implemented Interfaces:
  java.lang.Comparable

    public class Ranking
    extends java.lang.Object
    implements java.lang.Comparable

A Data class that associates a DAX with the rank.

Version:
  $Revision$
Author:
  Karan Vahi

### Field Summary

Fields
`private java.lang.String` `mName` The name of the DAX.
`private long` `mRank` Rank of the dax.
`private long` `mRuntime` The runtime of the dax in seconds.

### Constructor Summary

Constructors
Constructor and Description
`Ranking(java.lang.String name, long runtime)` The overloaded constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compareTo(java.lang.Object o)` Implementation of the `Comparable` interface.
`boolean` `equals(java.lang.Object o)`
`java.lang.String` `getName()` Returns the name of the dax.
`long` `getRank()` Returns the rank.
`long` `getRuntime()` Returns the runtime.
`void` `setName(java.lang.String name)` Sets the name.
`void` `setRank(long rank)` Sets the rank.
`void` `setRuntime(long runtime)` Sets the runtime.
`java.lang.String` `toString()` Returns a textual description.

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

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

### Field Detail

#### mName

    private java.lang.String mName

The name of the DAX.

#### mRank

    private long mRank

Rank of the dax.

#### mRuntime

    private long mRuntime

The runtime of the dax in seconds.

### Constructor Detail

#### Ranking

    public Ranking(java.lang.String name,
                   long runtime)

The overloaded constructor.

Parameters:
  `name` - the name of the dax
  `runtime` - the runtime of the dax

### Method Detail

#### setRuntime

    public void setRuntime(long runtime)

Sets the runtime.

Parameters:
  `runtime` - the runtime

#### setRank

    public void setRank(long rank)

Sets the rank.

Parameters:
  `rank` - the rank.

#### setName

    public void setName(java.lang.String name)

Sets the name.

Parameters:
  `name` - the name of the dax

#### getRank

    public long getRank()

Returns the rank.

Returns:
  the rank.

#### getRuntime

    public long getRuntime()

Returns the runtime.

Returns:
  the runtime

#### getName

    public java.lang.String getName()

Returns the name of the dax.

Returns:
  the name

#### toString

    public java.lang.String toString()

Returns a textual description.

Overrides:
  `toString` in class `java.lang.Object`
Returns:
  String

#### compareTo

    public int compareTo(java.lang.Object o)

Implementation of the `Comparable` interface. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The definitions are compared by their type, and by their short ids.

Specified by:
  `compareTo` in interface `java.lang.Comparable`
Parameters:
  `o` - is the object to be compared
Returns:
  a negative number, zero, or a positive number, if the object compared against is less than, equals or greater than this object.
Throws:
  `java.lang.ClassCastException` - if the specified object's type prevents it from being compared to this Object.

#### equals

    public boolean equals(java.lang.Object o)

Overrides:
  `equals` in class `java.lang.Object`