test_class.declarator: RATIO_400 = 400
test_class.modifier: private static final
test_class.original_string: private static final int RATIO_400 = 400;
test_class.type: int
test_class.var_name: RATIO_400
test_class.declarator: RATIO_999 = 999
test_class.modifier: private static final
test_class.original_string: private static final int RATIO_999 = 999;
test_class.type: int
test_class.var_name: RATIO_999
test_class.declarator: RATIO_1000 = 1000
test_class.modifier: private static final
test_class.original_string: private static final int RATIO_1000 = 1000;
test_class.type: int
test_class.var_name: RATIO_1000
test_class.file: decoder/src/test/java/openlr/decoder/data/CandidateLineTest.java
test_class.identifier: CandidateLineTest
test_case.body: @Test
      public final void testComparison() {
  
          TestData td = TestData.getInstance();
          Line line1 = td.getMapDatabase().getLine(1);
          Line line2 = td.getMapDatabase().getLine(2);
  
          CandidateLine ratio1000 = new CandidateLine(null, RATIO_1000);
          CandidateLine ratio999a = new CandidateLine(line1, RATIO_999, 0);
          CandidateLine rds03 = new CandidateLine(line2, RATIO_400, Integer.MAX_VALUE);
          CandidateLine ratio999b = new CandidateLine(null, RATIO_999);
          CandidateLine maxRatio = new CandidateLine(null, Integer.MAX_VALUE);
          CandidateLine minRatio = new CandidateLine(line2, Integer.MIN_VALUE);
          CandidateLine rdsRatioZero = new CandidateLine(null, 0);
  
          CandidateLineComparator comp = new CandidateLineComparator();
          assertTrue(comp.compare(ratio1000, ratio999a) < 0);
          assertTrue(comp.compare(ratio999a, ratio1000) > 0);
          assertTrue(comp.compare(ratio1000, rds03) < 0);
          assertTrue(comp.compare(rds03, ratio999a) > 0);
          assertTrue(comp.compare(ratio999a, ratio999b) == 0);
          assertTrue(comp.compare(maxRatio, minRatio) < 0);
          assertTrue(comp.compare(minRatio, maxRatio) > 0);
          assertTrue(comp.compare(minRatio, rdsRatioZero) > 0);
          assertTrue(comp.compare(rdsRatioZero, rdsRatioZero) == 0);
          assertTrue(comp.compare(rdsRatioZero, rdsRatioZero) == 0);
  
          CandidateLine[] expectedSorting = new CandidateLine[]{
                  maxRatio, ratio1000, ratio999a, rdsRatioZero, minRatio};
  
          List<CandidateLine> cLines = Arrays.asList(rdsRatioZero, minRatio,
                  maxRatio, ratio999a, ratio1000);
          Collections.sort(cLines, new CandidateLineComparator());
  
          for (int i = 0; i < expectedSorting.length; i++) {
              assertSame(cLines.get(i), expectedSorting[i],
                      "Unexpected entry at index " + i);
          }
      }
test_case.class_method_signature: CandidateLineTest.testComparison()
test_case.full_signature: @Test public final void testComparison()
test_case.identifier: testComparison
test_case.invocations: getInstance getLine getMapDatabase getLine getMapDatabase assertTrue compare assertTrue compare assertTrue compare assertTrue compare assertTrue compare assertTrue compare assertTrue compare assertTrue compare assertTrue compare assertTrue compare asList sort assertSame get
test_case.modifiers: @Test public final
test_case.parameters: ()
test_case.return: void
test_case.signature: void testComparison()
focal_class.declarator: INVALID = new CandidateLine()
focal_class.modifier: public static final
focal_class.original_string: public static final CandidateLine INVALID = new CandidateLine();
focal_class.type: CandidateLine
focal_class.var_name: INVALID
focal_class.declarator: line
focal_class.modifier: private final
focal_class.original_string: private final Line line;
focal_class.type: Line
focal_class.var_name: line
focal_class.declarator: rating
focal_class.modifier: private
focal_class.original_string: private int rating;
focal_class.type: int
focal_class.var_name: rating
focal_class.declarator: projectionAlongLine = Integer.MIN_VALUE
focal_class.modifier: private
focal_class.original_string: private int projectionAlongLine = Integer.MIN_VALUE;
focal_class.type: int
focal_class.var_name: projectionAlongLine
focal_class.file: decoder/src/main/java/openlr/decoder/data/CandidateLine.java
focal_class.identifier: CandidateLine
focal_class.class_method_signature: CandidateLine.CandidateLine(final Line l, final int r, final int projection)
focal_class.full_signature: public  CandidateLine(final Line l, final int r, final int projection)
focal_class.identifier: CandidateLine
focal_class.modifiers: public
focal_class.parameters: (final Line l, final int r, final int projection)
focal_class.signature:  CandidateLine(final Line l, final int r, final int projection)
focal_class.class_method_signature: CandidateLine.CandidateLine(final Line l, final int r)
focal_class.full_signature: public  CandidateLine(final Line l, final int r)
focal_class.identifier: CandidateLine
focal_class.modifiers: public
focal_class.parameters: (final Line l, final int r)
focal_class.signature:  CandidateLine(final Line l, final int r)
focal_class.class_method_signature: CandidateLine.CandidateLine()
focal_class.full_signature: private  CandidateLine()
focal_class.identifier: CandidateLine
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  CandidateLine()
focal_class.class_method_signature: CandidateLine.isValid()
focal_class.full_signature: public final boolean isValid()
focal_class.identifier: isValid
focal_class.modifiers: public final
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isValid()
focal_class.class_method_signature: CandidateLine.getLine()
focal_class.full_signature: public final Line getLine()
focal_class.identifier: getLine
focal_class.modifiers: public final
focal_class.parameters: ()
focal_class.return: Line
focal_class.signature: Line getLine()
focal_class.class_method_signature: CandidateLine.getRating()
focal_class.full_signature: public final int getRating()
focal_class.identifier: getRating
focal_class.modifiers: public final
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getRating()
focal_class.class_method_signature: CandidateLine.getProjectionAlongLine()
focal_class.full_signature: public final int getProjectionAlongLine()
focal_class.identifier: getProjectionAlongLine
focal_class.modifiers: public final
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getProjectionAlongLine()
focal_class.class_method_signature: CandidateLine.hasProjectionAlongLine()
focal_class.full_signature: public final boolean hasProjectionAlongLine()
focal_class.identifier: hasProjectionAlongLine
focal_class.modifiers: public final
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasProjectionAlongLine()
focal_class.class_method_signature: CandidateLine.toString()
focal_class.full_signature: @Override public final String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public final
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: CandidateLine.hasSameLine(final CandidateLine cl)
focal_class.full_signature: public final boolean hasSameLine(final CandidateLine cl)
focal_class.identifier: hasSameLine
focal_class.modifiers: public final
focal_class.parameters: (final CandidateLine cl)
focal_class.return: boolean
focal_class.signature: boolean hasSameLine(final CandidateLine cl)
focal_class.class_method_signature: CandidateLine.setNewRating(final int rate, final int lengthAlong)
focal_class.full_signature: public final void setNewRating(final int rate, final int lengthAlong)
focal_class.identifier: setNewRating
focal_class.modifiers: public final
focal_class.parameters: (final int rate, final int lengthAlong)
focal_class.return: void
focal_class.signature: void setNewRating(final int rate, final int lengthAlong)
focal_method.body: public final Line getLine() {
          return line;
      }
focal_method.class_method_signature: CandidateLine.getLine()
focal_method.full_signature: public final Line getLine()
focal_method.identifier: getLine
focal_method.modifiers: public final
focal_method.parameters: ()
focal_method.return: Line
focal_method.signature: Line getLine()