Search in sources :

Example 1 with Mathod

use of app.hongs.CoreRoster.Mathod in project HongsCORE by ihongs.

the class Common method showActions.

@Cmdlet("show-actions")
public static void showActions(String[] args) {
    Map<String, String> a = new TreeMap(new PropComparator());
    int i = 0, j;
    for (Map.Entry<String, Mathod> et : ActionRunner.getActions().entrySet()) {
        String k = et.getKey();
        Mathod v = et.getValue();
        a.put(k, v.toString());
        j = k.length();
        if (i < j && j < 31) {
            i = j;
        }
    }
    for (Map.Entry<String, String> n : a.entrySet()) {
        StringBuilder s = new StringBuilder();
        s.append(n.getKey());
        for (j = n.getKey().length(); j < i; j++) {
            s.append(" ");
        }
        s.append("\t");
        s.append(n.getValue());
        System.out.println(s);
    }
}
Also used : TreeMap(java.util.TreeMap) HashMap(java.util.HashMap) Map(java.util.Map) TreeMap(java.util.TreeMap) Mathod(app.hongs.CoreRoster.Mathod) Cmdlet(app.hongs.cmdlet.anno.Cmdlet)

Aggregations

Mathod (app.hongs.CoreRoster.Mathod)1 Cmdlet (app.hongs.cmdlet.anno.Cmdlet)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1