< prev index next >

src/java.base/share/classes/java/util/RegularEnumSet.java

Print this page

        

@@ -121,23 +121,23 @@
     public int size() {
         return Long.bitCount(elements);
     }
 
     /**
-     * Returns <tt>true</tt> if this set contains no elements.
+     * Returns {@code true} if this set contains no elements.
      *
-     * @return <tt>true</tt> if this set contains no elements
+     * @return {@code true} if this set contains no elements
      */
     public boolean isEmpty() {
         return elements == 0;
     }
 
     /**
-     * Returns <tt>true</tt> if this set contains the specified element.
+     * Returns {@code true} if this set contains the specified element.
      *
      * @param e element to be checked for containment in this collection
-     * @return <tt>true</tt> if this set contains the specified element
+     * @return {@code true} if this set contains the specified element
      */
     public boolean contains(Object e) {
         if (e == null)
             return false;
         Class<?> eClass = e.getClass();

@@ -151,13 +151,13 @@
 
     /**
      * Adds the specified element to this set if it is not already present.
      *
      * @param e element to be added to this set
-     * @return <tt>true</tt> if the set changed as a result of the call
+     * @return {@code true} if the set changed as a result of the call
      *
-     * @throws NullPointerException if <tt>e</tt> is null
+     * @throws NullPointerException if {@code e} is null
      */
     public boolean add(E e) {
         typeCheck(e);
 
         long oldElements = elements;

@@ -167,11 +167,11 @@
 
     /**
      * Removes the specified element from this set if it is present.
      *
      * @param e element to be removed from this set, if present
-     * @return <tt>true</tt> if the set contained the specified element
+     * @return {@code true} if the set contained the specified element
      */
     public boolean remove(Object e) {
         if (e == null)
             return false;
         Class<?> eClass = e.getClass();

@@ -184,15 +184,15 @@
     }
 
     // Bulk Operations
 
     /**
-     * Returns <tt>true</tt> if this set contains all of the elements
+     * Returns {@code true} if this set contains all of the elements
      * in the specified collection.
      *
      * @param c collection to be checked for containment in this set
-     * @return <tt>true</tt> if this set contains all of the elements
+     * @return {@code true} if this set contains all of the elements
      *        in the specified collection
      * @throws NullPointerException if the specified collection is null
      */
     public boolean containsAll(Collection<?> c) {
         if (!(c instanceof RegularEnumSet))

@@ -207,11 +207,11 @@
 
     /**
      * Adds all of the elements in the specified collection to this set.
      *
      * @param c collection whose elements are to be added to this set
-     * @return <tt>true</tt> if this set changed as a result of the call
+     * @return {@code true} if this set changed as a result of the call
      * @throws NullPointerException if the specified collection or any
      *     of its elements are null
      */
     public boolean addAll(Collection<? extends E> c) {
         if (!(c instanceof RegularEnumSet))

@@ -234,11 +234,11 @@
     /**
      * Removes from this set all of its elements that are contained in
      * the specified collection.
      *
      * @param c elements to be removed from this set
-     * @return <tt>true</tt> if this set changed as a result of the call
+     * @return {@code true} if this set changed as a result of the call
      * @throws NullPointerException if the specified collection is null
      */
     public boolean removeAll(Collection<?> c) {
         if (!(c instanceof RegularEnumSet))
             return super.removeAll(c);

@@ -255,11 +255,11 @@
     /**
      * Retains only the elements in this set that are contained in the
      * specified collection.
      *
      * @param c elements to be retained in this set
-     * @return <tt>true</tt> if this set changed as a result of the call
+     * @return {@code true} if this set changed as a result of the call
      * @throws NullPointerException if the specified collection is null
      */
     public boolean retainAll(Collection<?> c) {
         if (!(c instanceof RegularEnumSet))
             return super.retainAll(c);

@@ -283,16 +283,16 @@
         elements = 0;
     }
 
     /**
      * Compares the specified object with this set for equality.  Returns
-     * <tt>true</tt> if the given object is also a set, the two sets have
+     * {@code true} if the given object is also a set, the two sets have
      * the same size, and every member of the given set is contained in
      * this set.
      *
      * @param o object to be compared for equality with this set
-     * @return <tt>true</tt> if the specified object is equal to this set
+     * @return {@code true} if the specified object is equal to this set
      */
     public boolean equals(Object o) {
         if (!(o instanceof RegularEnumSet))
             return super.equals(o);
 
< prev index next >