java/copy-image-resizer/src/cz/frantovo/copyImageResizer/SizeSpecification.java
author František Kučera <franta-hg@frantovo.cz>
Mon, 17 Nov 2014 17:02:48 +0100
changeset 7 8e9983260624
parent 6 java/copy-image-resizer/src/cz/frantovo/copyImageResizer/RecursiveOptions.java@b329573c76d7
permissions -rw-r--r--
first working version
franta-hg@3
     1
/**
franta-hg@3
     2
 * copy-image-resizer
franta-hg@3
     3
 * Copyright © 2014 František Kučera (frantovo.cz)
franta-hg@3
     4
 *
franta-hg@3
     5
 * This program is free software: you can redistribute it and/or modify
franta-hg@3
     6
 * it under the terms of the GNU General Public License as published by
franta-hg@3
     7
 * the Free Software Foundation, either version 3 of the License, or
franta-hg@3
     8
 * (at your option) any later version.
franta-hg@3
     9
 *
franta-hg@3
    10
 * This program is distributed in the hope that it will be useful,
franta-hg@3
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@3
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
franta-hg@3
    13
 * GNU General Public License for more details.
franta-hg@3
    14
 *
franta-hg@3
    15
 * You should have received a copy of the GNU General Public License
franta-hg@3
    16
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
franta-hg@3
    17
 */
franta-hg@5
    18
package cz.frantovo.copyImageResizer;
franta-hg@3
    19
franta-hg@3
    20
/**
franta-hg@6
    21
 *
franta-hg@3
    22
 * @author Ing. František Kučera (frantovo.cz)
franta-hg@3
    23
 */
franta-hg@7
    24
public class SizeSpecification {
franta-hg@3
    25
franta-hg@7
    26
	private final int width;
franta-hg@7
    27
	private final int height;
franta-hg@7
    28
	private final String directory;
franta-hg@7
    29
	private final boolean resizeSmaller;
franta-hg@3
    30
franta-hg@7
    31
	public SizeSpecification(int width, int height, String directory, boolean resizeSmaller) {
franta-hg@7
    32
		this.width = width;
franta-hg@7
    33
		this.height = height;
franta-hg@7
    34
		this.directory = directory;
franta-hg@7
    35
		this.resizeSmaller = resizeSmaller;
franta-hg@3
    36
	}
franta-hg@3
    37
franta-hg@7
    38
	public int getWidth() {
franta-hg@7
    39
		return width;
franta-hg@3
    40
	}
franta-hg@3
    41
franta-hg@7
    42
	public int getHeight() {
franta-hg@7
    43
		return height;
franta-hg@3
    44
	}
franta-hg@3
    45
franta-hg@7
    46
	public String getDirectory() {
franta-hg@7
    47
		return directory;
franta-hg@3
    48
	}
franta-hg@3
    49
franta-hg@7
    50
	public boolean isResizeSmaller() {
franta-hg@7
    51
		return resizeSmaller;
franta-hg@3
    52
	}
franta-hg@3
    53
franta-hg@7
    54
	@Override
franta-hg@7
    55
	public String toString() {
franta-hg@7
    56
		return width + "×" + height + " → " + directory;
franta-hg@3
    57
	}
franta-hg@3
    58
}