<commit_before>/*
 * Copyright 2017, <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.fkeglevich.rawdumper.raw.data;

import android.support.annotation.Keep;

/**
 * Represents the size of a raw image. TODO: better explaining of this class
 *
 * Created by <NAME> on 26/12/2016.
 */

@Keep
@SuppressWarnings("unused")
public class RawImageSize
{
    private int width;
    private int height;

    private int paddedWidth;
    private int paddedWidthBytes;
    private int bytesPerLine;
    private int paddedHeight;
    private int bufferLength;

    private RawImageSize()
    {   }

    public int getWidth()
    {
        return width;
    }

    public int getHeight()
    {
        return height;
    }

    public int getPaddedWidth()
    {
        return paddedWidth;
    }

    public int getPaddedWidthBytes()
    {
        return paddedWidthBytes;
    }

    public int getBytesPerLine()
    {
        return bytesPerLine;
    }

    public int getPaddedHeight()
    {
        return paddedHeight;
    }

    public int getBufferLength()
    {
        return bufferLength;
    }

    public String toString()
    {
        return "[width: " + width +
                ", height: " + height +
                ", paddedWidth: " + paddedWidth +
                ", paddedWidthBytes: " + paddedWidthBytes +
                ", bytesPerLine: " + bytesPerLine +
                ", paddedHeight: " + paddedHeight +
                ", bufferLength: " + bufferLength + "]";
    }

    public boolean compareTo(RawImageSize another)<commit_msg>Added useful method for dealing with row buffers<commit_after>/*
 * Copyright 2017, <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.fkeglevich.rawdumper.raw.data;

import android.support.annotation.Keep;

/**
 * Represents the size of a raw image. TODO: better explaining of this class
 *
 * Created by <NAME> on 26/12/2016.
 */

@Keep
@SuppressWarnings("unused")
public class RawImageSize
{
    private int width;
    private int height;

    private int paddedWidth;
    private int paddedWidthBytes;
    private int bytesPerLine;
    private int paddedHeight;
    private int bufferLength;

    private RawImageSize()
    {   }

    public int getWidth()
    {
        return width;
    }

    public int getHeight()
    {
        return height;
    }

    public int getPaddedWidth()
    {
        return paddedWidth;
    }

    public int getPaddedWidthBytes()
    {
        return paddedWidthBytes;
    }

    public int getBytesPerLine()
    {
        return bytesPerLine;
    }

    public int getPaddedHeight()
    {
        return paddedHeight;
    }

    public int getBufferLength()
    {
        return bufferLength;
    }

    public byte[] buildValidRowBuffer()
    {
        return new byte[getPaddedWidthBytes()];
    }

    public String toString()
    {
        return "[width: " + width +
                ", height: " + height +
                ", paddedWidth: " + paddedWidth +
                ", paddedWidthBytes: " + paddedWidthBytes +
                ", bytesPerLine: " + bytesPerLine +
                ", paddedHeight: " + paddedHeight +
                ", bufferLength: " + bufferLength + "]";
    }

    public boolean compareTo(RawImageSize another)
{'fraction_non_alphanumeric': 0.08469435370975269, 'fraction_numerical': 0.007466168922071862, 'mean_word_length': 2.3782505910165486, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2770307', 'n_tokens_mistral': 1212, 'n_tokens_neox': 1161, 'n_words': 390}