package jxl.format;

/* JADX INFO: loaded from: classes.dex */
public class VerticalAlignment {
    private String string;
    private int value;
    private static VerticalAlignment[] alignments = new VerticalAlignment[0];
    public static VerticalAlignment TOP = new VerticalAlignment(0, "top");
    public static VerticalAlignment CENTRE = new VerticalAlignment(1, "centre");
    public static VerticalAlignment BOTTOM = new VerticalAlignment(2, "bottom");
    public static VerticalAlignment JUSTIFY = new VerticalAlignment(3, "Justify");

    public VerticalAlignment(int i2, String str) {
        this.value = i2;
        this.string = str;
        VerticalAlignment[] verticalAlignmentArr = alignments;
        VerticalAlignment[] verticalAlignmentArr2 = new VerticalAlignment[verticalAlignmentArr.length + 1];
        alignments = verticalAlignmentArr2;
        System.arraycopy(verticalAlignmentArr, 0, verticalAlignmentArr2, 0, verticalAlignmentArr.length);
        alignments[verticalAlignmentArr.length] = this;
    }

    public static VerticalAlignment getAlignment(int i2) {
        int i3 = 0;
        while (true) {
            VerticalAlignment[] verticalAlignmentArr = alignments;
            if (i3 >= verticalAlignmentArr.length) {
                return BOTTOM;
            }
            if (verticalAlignmentArr[i3].getValue() == i2) {
                return alignments[i3];
            }
            i3++;
        }
    }

    public String getDescription() {
        return this.string;
    }

    public int getValue() {
        return this.value;
    }
}
