test_class.file: rosjava/nrosjava_bootstrap/src/test/java/org/ros/message/DurationTest.java
test_class.identifier: DurationTest
test_case.body: @Test
    public void testNormalize() {
      Duration d = new Duration(0, 0);
      d.secs = 1;
      d.nsecs = 1000000000;
      d.normalize();
      assertEquals(2, d.secs);
      assertEquals(0, d.nsecs);
  
      d.secs = 1;
      d.nsecs = -1;
      d.normalize();
      assertEquals(0, d.secs);
      assertEquals(1000000000 - 1, d.nsecs);
    }
test_case.class_method_signature: DurationTest.testNormalize()
test_case.full_signature: @Test public void testNormalize()
test_case.identifier: testNormalize
test_case.invocations: normalize assertEquals assertEquals normalize assertEquals assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNormalize()
focal_class.declarator: MAX_VALUE = new Duration(Integer.MAX_VALUE, 999999999)
focal_class.modifier: public static final
focal_class.original_string: public static final Duration MAX_VALUE = new Duration(Integer.MAX_VALUE, 999999999);
focal_class.type: Duration
focal_class.var_name: MAX_VALUE
focal_class.declarator: secs
focal_class.modifier: public
focal_class.original_string: public int secs;
focal_class.type: int
focal_class.var_name: secs
focal_class.declarator: nsecs
focal_class.modifier: public
focal_class.original_string: public int nsecs;
focal_class.type: int
focal_class.var_name: nsecs
focal_class.file: rosjava/nrosjava_bootstrap/src/main/java/org/ros/message/Duration.java
focal_class.identifier: Duration
focal_class.interfaces: implements Comparable<Duration>
focal_class.class_method_signature: Duration.Duration()
focal_class.full_signature: public  Duration()
focal_class.identifier: Duration
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  Duration()
focal_class.class_method_signature: Duration.Duration(int secs, int nsecs)
focal_class.full_signature: public  Duration(int secs, int nsecs)
focal_class.identifier: Duration
focal_class.modifiers: public
focal_class.parameters: (int secs, int nsecs)
focal_class.signature:  Duration(int secs, int nsecs)
focal_class.class_method_signature: Duration.Duration(double secs)
focal_class.full_signature: public  Duration(double secs)
focal_class.identifier: Duration
focal_class.modifiers: public
focal_class.parameters: (double secs)
focal_class.signature:  Duration(double secs)
focal_class.class_method_signature: Duration.Duration(Duration t)
focal_class.full_signature: public  Duration(Duration t)
focal_class.identifier: Duration
focal_class.modifiers: public
focal_class.parameters: (Duration t)
focal_class.signature:  Duration(Duration t)
focal_class.class_method_signature: Duration.add(Duration d)
focal_class.full_signature: public Duration add(Duration d)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (Duration d)
focal_class.return: Duration
focal_class.signature: Duration add(Duration d)
focal_class.class_method_signature: Duration.subtract(Duration d)
focal_class.full_signature: public Duration subtract(Duration d)
focal_class.identifier: subtract
focal_class.modifiers: public
focal_class.parameters: (Duration d)
focal_class.return: Duration
focal_class.signature: Duration subtract(Duration d)
focal_class.class_method_signature: Duration.fromMillis(long durationInMillis)
focal_class.full_signature: public static Duration fromMillis(long durationInMillis)
focal_class.identifier: fromMillis
focal_class.modifiers: public static
focal_class.parameters: (long durationInMillis)
focal_class.return: Duration
focal_class.signature: Duration fromMillis(long durationInMillis)
focal_class.class_method_signature: Duration.fromNano(long durationInNs)
focal_class.full_signature: public static Duration fromNano(long durationInNs)
focal_class.identifier: fromNano
focal_class.modifiers: public static
focal_class.parameters: (long durationInNs)
focal_class.return: Duration
focal_class.signature: Duration fromNano(long durationInNs)
focal_class.class_method_signature: Duration.normalize()
focal_class.full_signature: public void normalize()
focal_class.identifier: normalize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void normalize()
focal_class.class_method_signature: Duration.totalNsecs()
focal_class.full_signature: public long totalNsecs()
focal_class.identifier: totalNsecs
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long totalNsecs()
focal_class.class_method_signature: Duration.isZero()
focal_class.full_signature: public boolean isZero()
focal_class.identifier: isZero
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isZero()
focal_class.class_method_signature: Duration.isPositive()
focal_class.full_signature: public boolean isPositive()
focal_class.identifier: isPositive
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isPositive()
focal_class.class_method_signature: Duration.isNegative()
focal_class.full_signature: public boolean isNegative()
focal_class.identifier: isNegative
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isNegative()
focal_class.class_method_signature: Duration.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: Duration.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: Duration.equals(Object obj)
focal_class.full_signature: @Override /** * Check for equality between Time objects. * equals() does not normalize Time representations, so fields must match exactly. */ public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override /** * Check for equality between Time objects. * equals() does not normalize Time representations, so fields must match exactly. */ public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_class.class_method_signature: Duration.compareTo(Duration d)
focal_class.full_signature: @Override public int compareTo(Duration d)
focal_class.identifier: compareTo
focal_class.modifiers: @Override public
focal_class.parameters: (Duration d)
focal_class.return: int
focal_class.signature: int compareTo(Duration d)
focal_method.body: public void normalize() {
      while (nsecs < 0) {
        nsecs += 1000000000;
        secs -= 1;
      }
      while (nsecs >= 1000000000) {
        nsecs -= 1000000000;
        secs += 1;
      }
    }
focal_method.class_method_signature: Duration.normalize()
focal_method.full_signature: public void normalize()
focal_method.identifier: normalize
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void normalize()