first commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package org.openautonomousconnection.luascript.events;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Normalizes event names.
|
||||
*/
|
||||
public final class UiEventRegistry {
|
||||
|
||||
private UiEventRegistry() { }
|
||||
|
||||
public static String normalize(String eventName) {
|
||||
if (eventName == null) throw new IllegalArgumentException("eventName is null");
|
||||
String e = eventName.trim().toLowerCase(Locale.ROOT);
|
||||
if (e.isEmpty()) throw new IllegalArgumentException("eventName is empty");
|
||||
return e;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user