/*
* Meviz - Various tools collection to work with multimedia.
- * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- *
+ * Copyright (C) 2012 -- 2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
public int width;
public int height;
- public Dimension() {
+ private Dimension() {
width = 0;
height = 0;
}
}
public boolean equals(final Dimension anotherDimension) {
- if (compareTo(anotherDimension) == 0)
- return true;
- return false;
+ return compareTo(anotherDimension) == 0;
}
public int getArea() {
return result;
}
+
+ @Override
+ public String toString() {
+ return "Dimension [width=" + width + ", height=" + height + "]";
+ }
+
}