private ConnectionGUID(UniqueIDGenerator generator) { guid = generator.getID(); }
private ConnectionGUID(String guid) { if (guid == null) { throw new IllegalArgumentException("guid string can not be null"); } guid = generator.getID(); }
public static void main(String[] args) { UniqueIDGenerator uniqueIDGenerator = new UniqueIDGenerator(); long startTime = System.currentTimeMillis(); for (int n = 0; n < 1000; n++) { uniqueIDGenerator.getID(); } long time = System.currentTimeMillis() - startTime; System.out.println("1000 GUIDS generated in " + time + " ms"); System.out.println("Avarage " + time / 1000 + " ms / GUID"); }
public DirectoryObjectCutClipboardItem(DirectoryTreeObject sourceObject, Messages messages, Workbench workbench, DirectoryEventListenerRegistry eventRegistry) { super(); this.messages = messages; this.workbench = workbench; this.sourceObject = sourceObject; this.eventRegistry = eventRegistry; id = idGenerator.getID(); description = messages.format("clipboard.object.copy", sourceObject .getConnectionInformation().getDescription(), sourceObject .getDistinguishedName().toString()); }
public DirectoryObjectCopyClipboardItem(DirectoryTreeObject sourceObject, Messages messages, Workbench workbench, DirectoryEventListenerRegistry eventRegistry) { super(); this.messages = messages; this.workbench = workbench; this.sourceObject = sourceObject; this.eventRegistry = eventRegistry; id = idGenerator.getID(); description = messages.format("clipboard.object.copy", sourceObject .getConnectionInformation().getDescription(), sourceObject .getDistinguishedName().toString()); }
action.putValue(Action.ACCELERATOR_KEY, stroke); if (component != null) { String actionName = idGenerator.getID(); component.getActionMap().put(actionName, action); component.getInputMap(JComponent.WHEN_FOCUSED).put(