org.sejda.model.pdf.page
Enum PredefinedSetOfPages

java.lang.Object
  extended by java.lang.Enum<PredefinedSetOfPages>
      extended by org.sejda.model.pdf.page.PredefinedSetOfPages
All Implemented Interfaces:
Serializable, Comparable<PredefinedSetOfPages>, FriendlyNamed, PagesSelection

public enum PredefinedSetOfPages
extends Enum<PredefinedSetOfPages>
implements PagesSelection, FriendlyNamed

Represent a predefined set of pages like odd or even pages.

Author:
Andrea Vacondio

Enum Constant Summary
ALL_PAGES
           
EVEN_PAGES
           
NONE
           
ODD_PAGES
           
 
Method Summary
 String getFriendlyName()
           
abstract  SortedSet<Integer> getPages(int totalNumberOfPage)
           
static PredefinedSetOfPages valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PredefinedSetOfPages[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ALL_PAGES

public static final PredefinedSetOfPages ALL_PAGES

EVEN_PAGES

public static final PredefinedSetOfPages EVEN_PAGES

ODD_PAGES

public static final PredefinedSetOfPages ODD_PAGES

NONE

public static final PredefinedSetOfPages NONE
Method Detail

values

public static PredefinedSetOfPages[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PredefinedSetOfPages c : PredefinedSetOfPages.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PredefinedSetOfPages valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getPages

public abstract SortedSet<Integer> getPages(int totalNumberOfPage)
Specified by:
getPages in interface PagesSelection
Parameters:
totalNumberOfPage - the number of pages of the document (upper limit).
Returns:
the selected set of pages ordered using their natural ordering.
See Also:
PagesSelection.getPages(int)

getFriendlyName

public String getFriendlyName()
Specified by:
getFriendlyName in interface FriendlyNamed
Returns:
the friendly name of the entity, to be usually used as a representation for an user.


Copyright © 2013. All Rights Reserved.