@Test public void throwsNumberFormatExceptionIfUpperBoundNotANumber() { mExpectedException.expect(NumberFormatException.class); PageRange.parse("1-q"); }
@NotNull public static PageRange parse(@NotNull String pages) { Preconditions.checkNotNull(pages, "Pages should not be null"); int lowerBound = parseLowerBound(pages); int upperBound = parseUpperBound(pages); return new PageRange(lowerBound, upperBound); }
PageRange { @NotNull public static PageRange parse(@NotNull String pages) { Preconditions.checkNotNull(pages, "Pages should not be null"); int lowerBound = parseLowerBound(pages); int upperBound = parseUpperBound(pages); return new PageRange(lowerBound, upperBound); } }
PageRange { @NotNull public static PageRange parse(@NotNull String pages) { Preconditions.checkNotNull(pages, "Pages should not be null"); int lowerBound = parseLowerBound(pages); int upperBound = parseUpperBound(pages); return new PageRange(lowerBound, upperBound); } private  PageRange(int lowerBound, int upperBound); }
PageRange { @NotNull public static PageRange parse(@NotNull String pages) { Preconditions.checkNotNull(pages, "Pages should not be null"); int lowerBound = parseLowerBound(pages); int upperBound = parseUpperBound(pages); return new PageRange(lowerBound, upperBound); } private  PageRange(int lowerBound, int upperBound); int getLowerBound(); int getUpperBound(); boolean isRange(); @NotNull static PageRange parse(@NotNull String pages); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
PageRange { @NotNull public static PageRange parse(@NotNull String pages) { Preconditions.checkNotNull(pages, "Pages should not be null"); int lowerBound = parseLowerBound(pages); int upperBound = parseUpperBound(pages); return new PageRange(lowerBound, upperBound); } private  PageRange(int lowerBound, int upperBound); int getLowerBound(); int getUpperBound(); boolean isRange(); @NotNull static PageRange parse(@NotNull String pages); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }