< prev index next >

jdk/src/java.base/share/classes/java/lang/Runtime.java

Print this page

        

@@ -943,11 +943,11 @@
         }
         return version;
     }
 
     /**
-     * A representation of a version string for an implemenation of the
+     * A representation of a version string for an implementation of the
      * Java&nbsp;SE Platform.  A version string contains a version number
      * optionally followed by pre-release and build information.
      *
      * <h2><a name="verNum">Version numbers</a></h2>
      *

@@ -1056,14 +1056,14 @@
      * {@code $VNUM = "10"} and {@code $OPT = "ea"}. </p>
      *
      * <p> When comparing two version strings, the value of {@code $OPT}, if
      * present, may or may not be significant depending on the chosen
      * comparison method.  The comparison methods {@link #compareTo(Version)
-     * compareTo()} and {@link #compareToIgnoreOpt(Version)
-     * compareToIgnoreOpt()} should be used consistently with the
+     * compareTo()} and {@link #compareToIgnoreOptional(Version)
+     * compareToIgnoreOptional()} should be used consistently with the
      * corresponding methods {@link #equals(Object) equals()} and {@link
-     * #equalsIgnoreOpt(Object) equalsIgnoreOpt()}.  </p>
+     * #equalsIgnoreOptional(Object) equalsIgnoreOptional()}.  </p>
      *
      * <p> A <em>short version string</em>, {@code $SVSTR}, often useful in
      * less formal contexts, is a version number optionally followed by a
      * pre-release identifier:
      *

@@ -1247,11 +1247,11 @@
          *          given {@code Version}
          *
          * @throws  NullPointerException
          *          If the given object is {@code null}
          */
-        public int compareToIgnoreOpt(Version ob) {
+        public int compareToIgnoreOptional(Version ob) {
             return compare(ob, true);
         }
 
         private int compare(Version ob, boolean ignoreOpt) {
             if (ob == null)

@@ -1268,11 +1268,11 @@
             ret = compareBuild(ob);
             if (ret != 0)
                 return ret;
 
             if (!ignoreOpt)
-                return compareOpt(ob);
+                return compareOptional(ob);
 
             return 0;
         }
 
         private int compareVersion(Version ob) {

@@ -1323,11 +1323,11 @@
                 return -1;
             }
             return 0;
         }
 
-        private int compareOpt(Version ob) {
+        private int compareOptional(Version ob) {
             Optional<String> oOpt = ob.optional();
             if (!optional.isPresent()) {
                 if (oOpt.isPresent())
                     return -1;
             } else {

@@ -1382,11 +1382,11 @@
          *          Version} that is identical to this {@code Version}
          *
          */
         @Override
         public boolean equals(Object ob) {
-            boolean ret = equalsIgnoreOpt(ob);
+            boolean ret = equalsIgnoreOptional(ob);
             if (!ret)
                 return false;
 
             Version that = (Version)ob;
             return (this.optional().equals(that.optional()));

@@ -1405,11 +1405,11 @@
          * @return  {@code true} if, and only if, the given object is a {@code
          *          Version} that is identical to this {@code Version}
          *          ignoring the optinal build information
          *
          */
-        public boolean equalsIgnoreOpt(Object ob) {
+        public boolean equalsIgnoreOptional(Object ob) {
             if (this == ob)
                 return true;
             if (!(ob instanceof Version))
                 return false;
 
< prev index next >