Skip to content

Commit

Permalink
Update Frameset.java
Browse files Browse the repository at this point in the history
Reformatted code
  • Loading branch information
litetex committed Jun 15, 2021
1 parent 824e056 commit 4999e6d
Showing 1 changed file with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@

public final class Frameset {

private List<String> urls;
private int frameWidth;
private int frameHeight;
private int totalCount;
private int durationPerFrame;
private int framesPerPageX;
private int framesPerPageY;

public Frameset(List<String> urls, int frameWidth, int frameHeight, int totalCount, int durationPerFrame, int framesPerPageX, int framesPerPageY) {
private final List<String> urls;
private final int frameWidth;
private final int frameHeight;
private final int totalCount;
private final int durationPerFrame;
private final int framesPerPageX;
private final int framesPerPageY;

public Frameset(
final List<String> urls,
final int frameWidth,
final int frameHeight,
final int totalCount,
final int durationPerFrame,
final int framesPerPageX,
final int framesPerPageY) {

this.urls = urls;
this.totalCount = totalCount;
this.durationPerFrame = durationPerFrame;
Expand Down Expand Up @@ -86,7 +94,7 @@ public int getDurationPerFrame() {
* <li><code>4</code>: Bottom bound</li>
* </ul>
*/
public int[] getFrameBoundsAt(long position) {
public int[] getFrameBoundsAt(final long position) {
if (position < 0 || position > ((totalCount + 1) * durationPerFrame)) {
// Return the first frame as fallback
return new int[] { 0, 0, 0, frameWidth, frameHeight };
Expand Down

0 comments on commit 4999e6d

Please sign in to comment.