1 12 package org.displaytag.pagination; 13 14 import org.apache.commons.lang.builder.ToStringBuilder; 15 import org.apache.commons.lang.builder.ToStringStyle; 16 17 18 23 public class NumberedPage 24 { 25 26 29 private int number; 30 31 34 private boolean selected; 35 36 41 public NumberedPage(int pageNumber, boolean isSelected) 42 { 43 this.number = pageNumber; 44 this.selected = isSelected; 45 } 46 47 51 public int getNumber() 52 { 53 return this.number; 54 } 55 56 60 public boolean getSelected() 61 { 62 return this.selected; 63 } 64 65 68 public String toString() 69 { 70 return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) .append("selected", this.selected) .append("number", this.number) .toString(); 74 } 75 } | Popular Tags |