test_class.declarator: left
test_class.modifier: @Parameter(0) public
test_class.original_string: @Parameter(0) public MediaType left;
test_class.type: MediaType
test_class.var_name: left
test_class.declarator: right
test_class.modifier: @Parameter(1) public
test_class.original_string: @Parameter(1) public MediaType right;
test_class.type: MediaType
test_class.var_name: right
test_class.declarator: expectedResult
test_class.modifier: @Parameter(2) public
test_class.original_string: @Parameter(2) public int       expectedResult;
test_class.type: int
test_class.var_name: expectedResult
test_class.declarator: mediaTypeComparator = new MediaTypeComparator()
test_class.modifier: private
test_class.original_string: private MediaTypeComparator mediaTypeComparator = new MediaTypeComparator();
test_class.type: MediaTypeComparator
test_class.var_name: mediaTypeComparator
test_class.file: everrest-core/src/test/java/org/everrest/core/util/MediaTypeComparatorTest.java
test_class.identifier: MediaTypeComparatorTest
test_case.body: @Test
      public void testCompare() throws Exception {
         assertEquals(expectedResult, mediaTypeComparator.compare(left, right));
      }
test_case.class_method_signature: MediaTypeComparatorTest.testCompare()
test_case.full_signature: @Test public void testCompare()
test_case.identifier: testCompare
test_case.invocations: assertEquals compare
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCompare()
focal_class.file: everrest-core/src/main/java/org/everrest/core/util/MediaTypeComparator.java
focal_class.identifier: MediaTypeComparator
focal_class.interfaces: implements Comparator<MediaType>
focal_class.class_method_signature: MediaTypeComparator.compare(MediaType mediaTypeOne, MediaType mediaTypeTwo)
focal_class.full_signature: @Override public int compare(MediaType mediaTypeOne, MediaType mediaTypeTwo)
focal_class.identifier: compare
focal_class.modifiers: @Override public
focal_class.parameters: (MediaType mediaTypeOne, MediaType mediaTypeTwo)
focal_class.return: int
focal_class.signature: int compare(MediaType mediaTypeOne, MediaType mediaTypeTwo)
focal_class.class_method_signature: MediaTypeComparator.toString(MediaType mime)
focal_class.full_signature: private String toString(MediaType mime)
focal_class.identifier: toString
focal_class.modifiers: private
focal_class.parameters: (MediaType mime)
focal_class.return: String
focal_class.signature: String toString(MediaType mime)
focal_method.body: @Override
      public int compare(MediaType mediaTypeOne, MediaType mediaTypeTwo) {
  
          if (mediaTypeOne.isWildcardType() && !mediaTypeTwo.isWildcardType()) {
              return 1;
          }
          if (mediaTypeOne.isWildcardSubtype() && !mediaTypeTwo.isWildcardSubtype()) {
              return 1;
          }
          if (!mediaTypeOne.isWildcardType() && mediaTypeTwo.isWildcardType()) {
              return -1;
          }
          if (!mediaTypeOne.isWildcardSubtype() && mediaTypeTwo.isWildcardSubtype()) {
              return -1;
          }
  
          Matcher extSubtypeMatcherOne = MediaTypeHelper.EXT_SUBTYPE_PATTERN.matcher(mediaTypeOne.getSubtype());
          Matcher extSubtypeMatcherTwo = MediaTypeHelper.EXT_SUBTYPE_PATTERN.matcher(mediaTypeTwo.getSubtype());
          boolean extSubtypeMatcherOneMatches = extSubtypeMatcherOne.matches();
          boolean extSubtypeMatcherTwoMatches = extSubtypeMatcherTwo.matches();
  
          if (extSubtypeMatcherOneMatches && !extSubtypeMatcherTwoMatches) {
              return 1;
          }
          if (!extSubtypeMatcherOneMatches && extSubtypeMatcherTwoMatches) {
              return -1;
          }
  
          extSubtypeMatcherOne = MediaTypeHelper.EXT_PREFIX_SUBTYPE_PATTERN.matcher(mediaTypeOne.getSubtype());
          extSubtypeMatcherTwo = MediaTypeHelper.EXT_PREFIX_SUBTYPE_PATTERN.matcher(mediaTypeTwo.getSubtype());
          extSubtypeMatcherOneMatches = extSubtypeMatcherOne.matches();
          extSubtypeMatcherTwoMatches = extSubtypeMatcherTwo.matches();
  
          if (extSubtypeMatcherOneMatches && !extSubtypeMatcherTwoMatches) {
              return 1;
          }
          if (!extSubtypeMatcherOneMatches && extSubtypeMatcherTwoMatches) {
              return -1;
          }
  
          extSubtypeMatcherOne = MediaTypeHelper.EXT_SUFFIX_SUBTYPE_PATTERN.matcher(mediaTypeOne.getSubtype());
          extSubtypeMatcherTwo = MediaTypeHelper.EXT_SUFFIX_SUBTYPE_PATTERN.matcher(mediaTypeTwo.getSubtype());
          extSubtypeMatcherOneMatches = extSubtypeMatcherOne.matches();
          extSubtypeMatcherTwoMatches = extSubtypeMatcherTwo.matches();
  
          if (extSubtypeMatcherOneMatches && !extSubtypeMatcherTwoMatches) {
              return 1;
          }
          if (!extSubtypeMatcherOneMatches && extSubtypeMatcherTwoMatches) {
              return -1;
          }
  
          return toString(mediaTypeOne).compareToIgnoreCase(toString(mediaTypeTwo));
      }
focal_method.class_method_signature: MediaTypeComparator.compare(MediaType mediaTypeOne, MediaType mediaTypeTwo)
focal_method.full_signature: @Override public int compare(MediaType mediaTypeOne, MediaType mediaTypeTwo)
focal_method.identifier: compare
focal_method.invocations: isWildcardType isWildcardType isWildcardSubtype isWildcardSubtype isWildcardType isWildcardType isWildcardSubtype isWildcardSubtype matcher getSubtype matcher getSubtype matches matches matcher getSubtype matcher getSubtype matches matches matcher getSubtype matcher getSubtype matches matches compareToIgnoreCase toString toString
focal_method.modifiers: @Override public
focal_method.parameters: (MediaType mediaTypeOne, MediaType mediaTypeTwo)
focal_method.return: int
focal_method.signature: int compare(MediaType mediaTypeOne, MediaType mediaTypeTwo)