src/share/classes/javax/accessibility/AccessibleStateSet.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -169,11 +169,11 @@
         if (states == null) {
             return new AccessibleState[0];
         } else {
             AccessibleState[] stateArray = new AccessibleState[states.size()];
             for (int i = 0; i < stateArray.length; i++) {
-                stateArray[i] = (AccessibleState) states.elementAt(i);
+                stateArray[i] = states.elementAt(i);
             }
             return stateArray;
         }
     }
 

@@ -185,15 +185,14 @@
      * @see AccessibleBundle#toDisplayString
      */
     public String toString() {
         String ret = null;
         if ((states != null) && (states.size() > 0)) {
-            ret = ((AccessibleState) (states.elementAt(0))).toDisplayString();
+            ret = states.elementAt(0).toDisplayString();
             for (int i = 1; i < states.size(); i++) {
                 ret = ret + ","
-                        + ((AccessibleState) (states.elementAt(i))).
-                                              toDisplayString();
+                        + states.elementAt(i).toDisplayString();
             }
         }
         return ret;
     }
 }