@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Size size = (Size) o;

        return width == size.width && height == size.height;
    }
Default sort order is ascending by size.
zxing-android-embedded/src/com/journeyapps/barcodescanner/Size.java