code: public Collection<Parameter<?>> getParameters(Metadata... characteristics) {
          if ((characteristics == null) || (characteristics.length == 0)) {
              return Collections.<Parameter<?>>emptySet();
          }
          
          EnumSet<Metadata> metadataSet = null;
          int length = characteristics.length;
          
          if (length == 1) {
              metadataSet = EnumSet.of(characteristics[0]);
          }
          else {
              Metadata[] array = new Metadata[length -1];
              
              // Start from the second(0-based index) element onwards to populate
              // the array.
              for (int i = 1; i < length; i++) {
                  array[i - 1] = characteristics[i];
              }
              
              metadataSet = EnumSet.of(characteristics[0], array);
          }
  
          Collection<Parameter<?>> extnParameters = getParameters();
          Collection<Parameter<?>> result = new ArrayList<Parameter<?>>();
          
          for (Parameter<?> extnParameter : extnParameters) {
              EnumSet<Metadata> paramMetadata = extnParameter.metadata();
              if (paramMetadata.containsAll(metadataSet)) {
                  result.add(extnParameter);
              }
          }
          
          return result;
      }
docs: Returns {@link Parameter}s defined in this {@link WebSocketExtension}
  that match all the specified characteristics. An empty Collection is
  returned if none of the {@link Parameter}s defined in this
  {@link WebSocketExtension} match all the specified characteristics.
  
  @return Collection of WebSocketExtensionParameters