lmw
2023-06-07 f9dd2cdac746d308d5c4bcfdbea389ab67a66b12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
package com.luck.picture.lib.entity;
 
import android.os.Parcel;
import android.os.Parcelable;
 
import java.util.ArrayList;
import java.util.List;
 
/**
 * @author:luck
 * @date:2016-12-31 15:21
 * @describe:MediaFolder Entity
 */
 
public class LocalMediaFolder implements Parcelable {
    /**
     * Folder name
     */
    private String name;
    /**
     * Folder first path
     */
    private String firstImagePath;
    /**
     * Folder media num
     */
    private int imageNum;
    /**
     * If the selected num
     */
    private int checkedNum;
    /**
     * If the selected
     */
    private boolean isChecked;
 
    /**
     * type
     */
    private int ofAllType = -1;
    /**
     * Whether or not the camera
     */
    private boolean isCameraFolder;
 
    private List<LocalMedia> images = new ArrayList<LocalMedia>();
 
    public boolean isChecked() {
        return isChecked;
    }
 
    public void setChecked(boolean checked) {
        isChecked = checked;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
 
    public String getFirstImagePath() {
        return firstImagePath;
    }
 
    public void setFirstImagePath(String firstImagePath) {
        this.firstImagePath = firstImagePath;
    }
 
    public int getImageNum() {
        return imageNum;
    }
 
    public void setImageNum(int imageNum) {
        this.imageNum = imageNum;
    }
 
    public List<LocalMedia> getImages() {
        return images == null ? new ArrayList<>() : images;
    }
 
    public void setImages(List<LocalMedia> images) {
        this.images = images;
    }
 
    public int getCheckedNum() {
        return checkedNum;
    }
 
    public void setCheckedNum(int checkedNum) {
        this.checkedNum = checkedNum;
    }
 
    public int getOfAllType() {
        return ofAllType;
    }
 
    public void setOfAllType(int ofAllType) {
        this.ofAllType = ofAllType;
    }
 
    public boolean isCameraFolder() {
        return isCameraFolder;
    }
 
    public void setCameraFolder(boolean cameraFolder) {
        isCameraFolder = cameraFolder;
    }
 
    public LocalMediaFolder() {
    }
 
    @Override
    public int describeContents() {
        return 0;
    }
 
    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeString(this.firstImagePath);
        dest.writeInt(this.imageNum);
        dest.writeInt(this.checkedNum);
        dest.writeByte(this.isChecked ? (byte) 1 : (byte) 0);
        dest.writeInt(this.ofAllType);
        dest.writeByte(this.isCameraFolder ? (byte) 1 : (byte) 0);
        dest.writeTypedList(this.images);
    }
 
    protected LocalMediaFolder(Parcel in) {
        this.name = in.readString();
        this.firstImagePath = in.readString();
        this.imageNum = in.readInt();
        this.checkedNum = in.readInt();
        this.isChecked = in.readByte() != 0;
        this.ofAllType = in.readInt();
        this.isCameraFolder = in.readByte() != 0;
        this.images = in.createTypedArrayList(LocalMedia.CREATOR);
    }
 
    public static final Creator<LocalMediaFolder> CREATOR = new Creator<LocalMediaFolder>() {
        @Override
        public LocalMediaFolder createFromParcel(Parcel source) {
            return new LocalMediaFolder(source);
        }
 
        @Override
        public LocalMediaFolder[] newArray(int size) {
            return new LocalMediaFolder[size];
        }
    };
}