View Javadoc

1   package com.atlassian.core.util.thumbnail;
2   
3   /**
4    * The height and width of an image or thumbnail.
5    */
6   public final class Dimensions
7   {
8       private final int width;
9       private final int height;
10  
11      public Dimensions(int width, int height)
12      {
13          this.height = height;
14          this.width = width;
15      }
16  
17      public int getWidth()
18      {
19          return width;
20      }
21  
22      public int getHeight()
23      {
24          return height;
25      }
26  
27      // generated by IDEA
28      public boolean equals(Object o)
29      {
30          if (this == o) return true;
31          if (o == null || getClass() != o.getClass()) return false;
32  
33          Dimensions that = (Dimensions) o;
34  
35          if (height != that.height) return false;
36          if (width != that.width) return false;
37  
38          return true;
39      }
40  
41      // generated by IDEA
42      public int hashCode()
43      {
44          int result;
45          result = width;
46          result = 31 * result + height;
47          return result;
48      }
49  
50      public String toString() {
51          return width + "x" + height;
52      }
53  }