📄 levelfilter.java
字号:
/**
* Write a description of class userFilter here.
*
* @author (your name)
* @version (a version number or a date)
*/
import java.io.*;
import java.util.*;
import javax.swing.*;
public class LevelFilter implements FilenameFilter
{
// instance variable
String userFileExtension = ".lvl";
/**
* An example of a method - replace this comment with your own
*
* @param y a sample parameter for a method
* @return the sum of x and y
*/
public boolean accept(File file, String name)
{
if (new File(file, name).isDirectory())
{
return false;
}
String temp = name.toLowerCase();
return temp.endsWith(userFileExtension);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -