org.dspace.app.xmlui.aspect.submission
Class StepAndPage

java.lang.Object
  extended by org.dspace.app.xmlui.aspect.submission.StepAndPage
All Implemented Interfaces:
java.lang.Comparable<StepAndPage>

public class StepAndPage
extends java.lang.Object
implements java.lang.Comparable<StepAndPage>

Holds a step number and a page number within that step.

Author:
Mark Wood

Constructor Summary
StepAndPage()
          Default constructor returns an unset instance
StepAndPage(int step, int page)
          Initialize a new StepAndPage from given step and page numbers
StepAndPage(java.lang.String asString)
          Initialize a new StepAndPage by parsing a string of the form "step.page".
 
Method Summary
 int compareTo(StepAndPage o)
           
 boolean equals(java.lang.Object other)
          Compare this StepAndPage with another
 int getPage()
           
 int getStep()
           
 int hashCode()
           
 boolean isSet()
          Does this instance have a value?
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StepAndPage

public StepAndPage()
Default constructor returns an unset instance


StepAndPage

public StepAndPage(int step,
                   int page)
Initialize a new StepAndPage from given step and page numbers

Parameters:
step -
page -

StepAndPage

public StepAndPage(java.lang.String asString)
Initialize a new StepAndPage by parsing a string of the form "step.page".

Parameters:
asString - decimal step and page numbers separated by a period.
Method Detail

getStep

public int getStep()

getPage

public int getPage()

isSet

public boolean isSet()
Does this instance have a value?

Returns:
true if step and page have been set

equals

public boolean equals(java.lang.Object other)
Compare this StepAndPage with another

Overrides:
equals in class java.lang.Object
Parameters:
other -
Returns:
true if both objects have same step value and same page value.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(StepAndPage o)
Specified by:
compareTo in interface java.lang.Comparable<StepAndPage>


Copyright © 2010 DuraSpace. All Rights Reserved.