<commit_before>package com.t28.rxweather.data.model;

import android.text.TextUtils;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;

@JsonDeserialize(builder = City.Builder.class)
public class City implements Model {
    public static final int NO_ID = -1;
    public static final String NO_CODE = "";

    private final int mId;
    private final String mName;
    private final String mCountryCode;
    private final Coordinate mCoordinate;

    private City(Builder builder) {
        mId = builder.mId;
        mName = builder.mName;
        mCountryCode = builder.mCountryCode;
        mCoordinate = builder.mCoordinate;
    }

    @Override
    public boolean isValid() {
        if (mId == NO_ID) {
            return false;
        }

        if (TextUtils.isEmpty(mName)) {
            return false;
        }

        if (TextUtils.isEmpty(mCountryCode)) {
            return false;
        }

        if (mCoordinate == null) {
            return false;
        }
        return mCoordinate.isValid();
    }

    public boolean isEmpty() {
        if (mId != NO_ID) {
            return false;
        }

        if (!TextUtils.isEmpty(mName)) {
            return false;
        }

        if (!TextUtils.isEmpty(mCountryCode)) {
            return false;
        }

        if (mCoordinate != null) {
            return false;
        }
        return true;
    }

    public int getId() {
        return mId;
    }

    public String getName() {
        return mName;
    }

    public String getCountryCode() {
        return mCountryCode;
    }

    @JsonPOJOBuilder(withPrefix = "set")
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Builder {
        private int mId = NO_ID;
        private String mName;
        private String mCountryCode;
        private Coordinate mCoordinate;

        public Builder() {
        }

        public Builder setId(int id) {
            mId = id;
            return this;
        }

        public Builder setName(String name) {
            mName = name;
            return this;
        }

        @JsonProperty("country")
        public Builder setCountryCode(String code) {
            mCountryCode = code;
            return this;
        }

        @JsonProperty("coord")
        public Builder setCoordinate(Coordinate coordinate) {
            mCoordinate = coordinate;
            return this;
        }

        public City build() {
            return new City(this);
        }
    }
}<commit_msg>不要なプロパティ削除<commit_after>package com.t28.rxweather.data.model;

import android.text.TextUtils;

public class City implements Model {
    public static final int NO_ID = -1;

    private final int mId;
    private final String mName;
    private final String mCountryCode;
    private final Coordinate mCoordinate;

    private City(Builder builder) {
        mId = builder.mId;
        mName = builder.mName;
        mCountryCode = builder.mCountryCode;
        mCoordinate = builder.mCoordinate;
    }

    @Override
    public boolean isValid() {
        if (mId == NO_ID) {
            return false;
        }

        if (TextUtils.isEmpty(mName)) {
            return false;
        }

        if (TextUtils.isEmpty(mCountryCode)) {
            return false;
        }

        if (mCoordinate == null) {
            return false;
        }
        return mCoordinate.isValid();
    }

    public int getId() {
        return mId;
    }

    public String getName() {
        return mName;
    }

    public String getCountryCode() {
        return mCountryCode;
    }

    public static class Builder {
        private int mId = NO_ID;
        private String mName;
        private String mCountryCode;
        private Coordinate mCoordinate;

        public Builder() {
        }

        public Builder setId(int id) {
            mId = id;
            return this;
        }

        public Builder setName(String name) {
            mName = name;
            return this;
        }

        public Builder setCountryCode(String code) {
            mCountryCode = code;
            return this;
        }

        public Builder setCoordinate(Coordinate coordinate) {
            mCoordinate = coordinate;
            return this;
        }

        public City build() {
            return new City(this);
        }
    }
}
{'fraction_non_alphanumeric': 0.0798849302943129, 'fraction_numerical': 0.0013277273733126797, 'mean_word_length': 1.751065124771759, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '3952206', 'n_tokens_mistral': 1262, 'n_tokens_neox': 1207, 'n_words': 320}