code: private boolean contains(String[] names, String name) {
          assert name != null;
  
          for (int i = 0; i < names.length; i++) {
  
              if (name.equals(names[i])) {
                  return true;
              }
          }
  
          return false;
      }
docs: Simple utility method that searchs the given array of Strings for the
  given string. This method is only called from getExtendedState if the
  developer has specified a specific state for the component to be in (ie,
  has "wedged" the component in that state) by specifying they client
  property "SeaGlass.State".
  
  @param  names a non-null array of strings
  @param  name  the name to look for in the array
  
  @return true or false based on whether the given name is in the array