org.sejda.model.rotation
Class PageRotation

java.lang.Object
  extended by org.sejda.model.rotation.PageRotation

public final class PageRotation
extends Object

Model representing a rotation to be applied to a single page or to a class of pages (even, odd, all)

Author:
Andrea Vacondio

Method Summary
 boolean accept(int page)
           
static PageRotation createMultiplePagesRotation(Rotation rotation, RotationType rotationType)
          Creates a non single page rotation
static PageRotation createSinglePageRotation(int pageNumber, Rotation rotation)
          Creates a single page rotation for the given pageNumber and the given Rotation
 boolean equals(Object other)
           
 int getPageNumber()
           
 Rotation getRotation()
           
 RotationType getRotationType()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getPageNumber

public int getPageNumber()
Returns:
the pageNumber

getRotation

public Rotation getRotation()
Returns:
the rotation

getRotationType

public RotationType getRotationType()
Returns:
the rotationType

accept

public boolean accept(int page)
Parameters:
page -
Returns:
true if this rotation accept the given page number

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

createSinglePageRotation

public static PageRotation createSinglePageRotation(int pageNumber,
                                                    Rotation rotation)
Creates a single page rotation for the given pageNumber and the given Rotation

Parameters:
pageNumber -
rotation -
Returns:
the created instance
Throws:
IllegalStateException - if the page number is not positive.

createMultiplePagesRotation

public static PageRotation createMultiplePagesRotation(Rotation rotation,
                                                       RotationType rotationType)
Creates a non single page rotation

Parameters:
rotation -
rotationType -
Returns:
the created instance
Throws:
IllegalStateException - if the rotation type is single page rotation.


Copyright © 2013 sejda. All Rights Reserved.