⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 commandcollection.java

📁 java 文件下载器。可自定义
💻 JAVA
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   CommandCollection.java

package org.gudy.azureus2.ui.console.commands;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.*;
import org.gudy.azureus2.ui.console.ConsoleInput;

// Referenced classes of package org.gudy.azureus2.ui.console.commands:
//			IConsoleCommand

public class CommandCollection
{

	private final Map subCommands = new HashMap();

	public CommandCollection()
	{
	}

	public void execute(String commandName, ConsoleInput ci, List args)
	{
		IConsoleCommand command = get(commandName);
		command.execute(commandName, ci, args);
	}

	public String getCommandDescriptions()
	{
		StringWriter sw = new StringWriter();
		PrintWriter out = new PrintWriter(sw);
		IConsoleCommand cmd;
		for (Iterator iter = iterator(); iter.hasNext(); out.println(cmd.getCommandDescriptions()))
			cmd = (IConsoleCommand)iter.next();

		return sw.toString();
	}

	public IConsoleCommand get(String commandName)
	{
		return (IConsoleCommand)subCommands.get(commandName);
	}

	public void add(IConsoleCommand command)
	{
		String cmdName;
		for (Iterator iter = command.getCommandNames().iterator(); iter.hasNext(); subCommands.put(cmdName, command))
			cmdName = (String)iter.next();

	}

	public Iterator iterator()
	{
		return (new HashSet(subCommands.values())).iterator();
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -