Commit 06ab4a0f authored by 赵鹏翔's avatar 赵鹏翔

日志相关数据模型转换成kotlin

parent 970ba942
package com.miya.fastcashier.log;
import java.io.File;
import java.io.FileFilter;
/**
* 作者:Leon
* 时间:2017/3/24 13:43
*/
public class LFileFilter implements FileFilter {
private String[] mTypes;
public LFileFilter(String[] types) {
this.mTypes = types;
}
@Override
public boolean accept(File file) {
if (file.isDirectory()) {
return true;
}
if (mTypes != null && mTypes.length > 0) {
for (int i = 0; i < mTypes.length; i++) {
if (file.getName().endsWith(mTypes[i].toLowerCase()) || file.getName().endsWith(mTypes[i].toUpperCase())) {
return true;
}
}
}else {
return true;
}
return false;
}
}
package com.miya.fastcashier.log
import java.io.File
import java.io.FileFilter
/**
* 作者:Leon
* 时间:2017/3/24 13:43
*/
class LFileFilter(private val mTypes: Array<String>?) : FileFilter {
override fun accept(file: File): Boolean {
if (file.isDirectory) {
return true
}
if (mTypes != null && mTypes.size > 0) {
for (i in mTypes.indices) {
if (file.name.endsWith(mTypes[i].toLowerCase()) || file.name.endsWith(mTypes[i].toUpperCase())) {
return true
}
}
} else {
return true
}
return false
}
}
\ No newline at end of file
package com.miya.fastcashier.log;
import java.io.Serializable;
/**
* 作者:Leon
* 时间:2017/3/21 14:50
*/
public class ParamEntity implements Serializable {
private String title;
private String titleColor;
private int titleStyle ;
private int theme ;
private String backgroundColor;
private int backIcon;
private boolean mutilyMode;
private String addText;
private int iconStyle;
private String[] fileTypes;
private String notFoundFiles;
private int maxNum;
private boolean chooseMode = true;
private String path;
private long fileSize;
private boolean isGreater;
private String fileName;
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Deprecated
public String getTitleColor() {
return titleColor;
}
@Deprecated
public void setTitleColor(String titleColor) {
this.titleColor = titleColor;
}
public int getTheme() {
return theme;
}
public void setTheme(int theme) {
this.theme = theme;
}
public int getTitleStyle() {
return titleStyle;
}
public void setTitleStyle(int titleStyle) {
this.titleStyle = titleStyle;
}
public String getBackgroundColor() {
return backgroundColor;
}
public void setBackgroundColor(String backgroundColor) {
this.backgroundColor = backgroundColor;
}
public boolean isMutilyMode() {
return mutilyMode;
}
public void setMutilyMode(boolean mutilyMode) {
this.mutilyMode = mutilyMode;
}
public int getBackIcon() {
return backIcon;
}
public void setBackIcon(int backIcon) {
this.backIcon = backIcon;
}
public String getAddText() {
return addText;
}
public void setAddText(String addText) {
this.addText = addText;
}
public int getIconStyle() {
return iconStyle;
}
public void setIconStyle(int iconStyle) {
this.iconStyle = iconStyle;
}
public String[] getFileTypes() {
return fileTypes;
}
public void setFileTypes(String[] fileTypes) {
this.fileTypes = fileTypes;
}
public String getNotFoundFiles() {
return notFoundFiles;
}
public void setNotFoundFiles(String notFoundFiles) {
this.notFoundFiles = notFoundFiles;
}
public int getMaxNum() {
return maxNum;
}
public void setMaxNum(int maxNum) {
this.maxNum = maxNum;
}
public boolean isChooseMode() {
return chooseMode;
}
public void setChooseMode(boolean chooseMode) {
this.chooseMode = chooseMode;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public long getFileSize() {
return fileSize;
}
public void setFileSize(long fileSize) {
this.fileSize = fileSize;
}
public boolean isGreater() {
return isGreater;
}
public void setGreater(boolean greater) {
isGreater = greater;
}
}
package com.miya.fastcashier.log
import java.io.Serializable
/**
* 作者:Leon
* 时间:2017/3/21 14:50
*/
class ParamEntity : Serializable {
var title: String? = null
@get:Deprecated("")
@set:Deprecated("")
var titleColor: String? = null
var titleStyle = 0
var theme = 0
var backgroundColor: String? = null
var backIcon = 0
var isMutilyMode = false
var addText: String? = null
var iconStyle = 0
var fileTypes: Array<String>? = null
var notFoundFiles: String? = null
var maxNum = 0
var isChooseMode = true
var path: String? = null
var fileSize: Long = 0
var isGreater = false
var fileName: String? = null
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment