aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/apache/commons/lang3/SystemUtils.java
diff options
context:
space:
mode:
authorGary Gregory <garydgregory@gmail.com>2021-01-01 11:12:07 -0500
committerGary Gregory <garydgregory@gmail.com>2021-01-01 11:12:07 -0500
commit733768a6d9d0d8f7b419575fa53b431d2e5d35b6 (patch)
tree9f562ef0cbc4ae84cabb136621bf6d057fb26ff5 /src/main/java/org/apache/commons/lang3/SystemUtils.java
parentf5c86f6d4e8d9023f9e023fb1cd09ef47c8fd1cf (diff)
downloadapache-commons-lang-733768a6d9d0d8f7b419575fa53b431d2e5d35b6.tar.gz
Add recent macOS versions.
macOS 10.12 Sierra macOS 10.13 High Sierra macOS 10.14 Mojave macOS 10.15 Catalina macOS 10.16 Big Sur (a.k.a. 11.0, 11.1)
Diffstat (limited to 'src/main/java/org/apache/commons/lang3/SystemUtils.java')
-rw-r--r--src/main/java/org/apache/commons/lang3/SystemUtils.java60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/main/java/org/apache/commons/lang3/SystemUtils.java b/src/main/java/org/apache/commons/lang3/SystemUtils.java
index 8ef945c6c..60478b30c 100644
--- a/src/main/java/org/apache/commons/lang3/SystemUtils.java
+++ b/src/main/java/org/apache/commons/lang3/SystemUtils.java
@@ -1288,6 +1288,66 @@ public class SystemUtils {
/**
* <p>
+ * Is {@code true} if this is Mac OS X Sierra.
+ * </p>
+ * <p>
+ * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+ * </p>
+ *
+ * @since 3.12
+ */
+ public static final boolean IS_OS_MAC_OSX_SIERRA = getOsMatches("Mac OS X", "10.12");
+
+ /**
+ * <p>
+ * Is {@code true} if this is Mac OS X High Sierra.
+ * </p>
+ * <p>
+ * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+ * </p>
+ *
+ * @since 3.12
+ */
+ public static final boolean IS_OS_MAC_OSX_HIGH_SIERRA = getOsMatches("Mac OS X", "10.13");
+
+ /**
+ * <p>
+ * Is {@code true} if this is Mac OS X Mojave.
+ * </p>
+ * <p>
+ * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+ * </p>
+ *
+ * @since 3.12
+ */
+ public static final boolean IS_OS_MAC_OSX_MOJAVE = getOsMatches("Mac OS X", "10.14");
+
+ /**
+ * <p>
+ * Is {@code true} if this is Mac OS X Catalina.
+ * </p>
+ * <p>
+ * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+ * </p>
+ *
+ * @since 3.12
+ */
+ public static final boolean IS_OS_MAC_OSX_CATALINA = getOsMatches("Mac OS X", "10.15");
+
+ /**
+ * <p>
+ * Is {@code true} if this is Mac OS X Big Sur.
+ * </p>
+ * <p>
+ * The field will return {@code false} if {@code OS_NAME} is {@code null}.
+ * </p>
+ *
+ * @since 3.12
+ */
+ public static final boolean IS_OS_MAC_OSX_BIG_SUR = getOsMatches("Mac OS X", "10.16");
+
+ /**
+ * <p>
* Is {@code true} if this is FreeBSD.
* </p>
* <p>