levelfilter.java
来自「一个飞机调度员模拟训练程序,可以添加跑道数量,控制飞机飞行的速度.默认的密码可以」· Java 代码 · 共 35 行
JAVA
35 行
/**
* 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 + =
减小字号Ctrl + -
显示快捷键?