Class InstructionUtil
java.lang.Object
xyz.gmitch215.socketmc.instruction.InstructionUtil
Utilities used in the validaton and execution of instructions.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Pattern
A regular expression pattern that matches a valid email address. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isEmailAddress
(@Nullable String email) Checks if the given string is a valid email address.static @org.jetbrains.annotations.NotNull float[]
parseColor
(int color) Parses a color integer into an array of floats representing the RGB values.
-
Field Details
-
VALID_EMAIL_ADDRESS
A regular expression pattern that matches a valid email address.
This expression is based on the RFC 5322 standard for email addresses.
-
-
Method Details
-
isEmailAddress
Checks if the given string is a valid email address.- Parameters:
email
- The email address to check.- Returns:
true
if the email address is valid,false
otherwise.- See Also:
-
parseColor
Parses a color integer into an array of floats representing the RGB values.- Parameters:
color
- The color integer to parse.- Returns:
- An array of floats representing the RGB values.
-