edu.isi.pegasus.planner.ranking
Class Ranking

java.lang.Object
  extended by edu.isi.pegasus.planner.ranking.Ranking
All Implemented Interfaces:
Comparable

public class Ranking
extends Object
implements Comparable

A Data class that associates a DAX with the rank.

Version:
$Revision: 793 $
Author:
Karan Vahi

Field Summary
private  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
Ranking(String name, long runtime)
          The overloaded constructor.
 
Method Summary
 int compareTo(Object o)
          Implementation of the Comparable interface.
 boolean equals(Object o)
           
 String getName()
          Returns the name of the dax.
 long getRank()
          Returns the rank.
 long getRuntime()
          Returns the runtime.
 void setName(String name)
          Sets the name.
 void setRank(long rank)
          Sets the rank.
 void setRuntime(long runtime)
          Sets the runtime.
 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 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(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(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 String getName()
Returns the name of the dax.

Returns:
the name

toString

public String toString()
Returns a textual description.

Overrides:
toString in class Object
Returns:
String

compareTo

public int compareTo(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 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:
ClassCastException - if the specified object's type prevents it from being compared to this Object.

equals

public boolean equals(Object o)
Overrides:
equals in class Object


Copyright © 2011 The University of Southern California. All Rights Reserved.