/**
 * Copyright (C) 2010-14 pvmanager developers. See COPYRIGHT.TXT
 * All rights reserved. Use is subject to license terms. See LICENSE.TXT
 */
package org.epics.vtype.ndarray;

import org.epics.util.array.ListNumber;

/**
 *
 * @author carcassi
 */
public class DimensionInfo {
    
    private final int size;
    private final ListNumber boundaries;
    private final boolean invert;
    private final String unit;

    public DimensionInfo(int size, ListNumber boundaries, boolean invert, String unit) {
        this.size = size;
        this.boundaries = boundaries;
        this.invert = invert;
        this.unit = unit;
    }

    public int getSize() {
        return size;
    }

    public String getUnit() {
        return unit;
    }

    public boolean isInvert() {
        return invert;
    }

    public ListNumber getBoundaries() {
        return boundaries;
    }
    
}

@@ -173,16 +173,42 @@
 array;%0A%0A
+import java.util.Objects;%0A
 import o
@@ -903,16 +903,600 @@
 s;%0A    %7D
+%0A%0A    @Override%0A    public int hashCode() %7B%0A        return getBoundaries().hashCode();%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object obj) %7B%0A        if (obj instanceof DimensionInfo) %7B%0A            DimensionInfo info = (DimensionInfo) obj;%0A            return Objects.equals(info.getSize(), getSize()) &&%0A                    Objects.equals(info.isInvert(), isInvert()) &&%0A                    Objects.equals(info.getUnit(), getUnit()) &&%0A                    Objects.equals(info.getBoundaries(), getBoundaries());%0A                    %0A        %7D%0A        %0A        return false;%0A    %7D
 %0A    %0A%7D%0A

implement equals for DimensionInfo