com.pietschy.command.util
Class IdHelper

java.lang.Object
  extended by com.pietschy.command.util.IdHelper

public class IdHelper
extends java.lang.Object

Helper class for creating and checking anonymous command ids.


Method Summary
static java.lang.String createAnonymousId()
          Creates an anonymous id string.
static boolean isAnonymous(Command command)
          Checks if the specified command has an anonymous id.
static boolean isAnonymous(java.lang.String id)
          Checks if this is an anonymous command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createAnonymousId

public static java.lang.String createAnonymousId()
Creates an anonymous id string.

Returns:
an anonymous id string.

isAnonymous

public static boolean isAnonymous(java.lang.String id)
Checks if this is an anonymous command. Anonymous commands have no id, and can't be exported or configured by the ConfigurationLoader. They are useful when you need to programatically create a command.

All commands created without an id are anonymous.

Returns:
true if this command is anonymous, false otherwise.

isAnonymous

public static boolean isAnonymous(Command command)
Checks if the specified command has an anonymous id.

Parameters:
command - the command to check.
Returns:
true if it has an anonymous id, false otherwise.


Copyright © 2006 - 2007 Andrew Pietsch