src/share/classes/java/awt/print/Book.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -45,19 +45,19 @@
/* Instance Variables */
/**
* The set of pages that make up the Book.
*/
- private Vector mPages;
+ private Vector<BookPage> mPages;
/* Instance Methods */
/**
* Creates a new, empty <code>Book</code>.
*/
public Book() {
- mPages = new Vector();
+ mPages = new Vector<BookPage>();
}
/**
* Returns the number of pages in this <code>Book</code>.
* @return the number of pages this <code>Book</code> contains.
@@ -165,11 +165,11 @@
* Return the BookPage for the page specified by 'pageIndex'.
*/
private BookPage getPage(int pageIndex)
throws ArrayIndexOutOfBoundsException
{
- return (BookPage) mPages.elementAt(pageIndex);
+ return mPages.elementAt(pageIndex);
}
/**
* The BookPage inner class describes an individual
* page in a Book through a PageFormat-Printable pair.