test_class.file: core/src/test/java/org/carrot2/attrs/AttrDoubleTest.java
test_class.identifier: AttrDoubleTest
test_class.superclass: extends TestBase
test_case.body: @Test
    public void testToFromMap() {
      class Clazz extends AttrComposite {
        public AttrDouble defValue =
            attributes.register("defValue", AttrDouble.builder().defaultValue(36.6));
        public AttrDouble nullValue =
            attributes.register("nullValue", AttrDouble.builder().defaultValue(null));
        public AttrDouble otherValue =
            attributes.register("otherValue", AttrDouble.builder().defaultValue(null));
        public AttrDouble nanValue =
            attributes.register("nanValue", AttrDouble.builder().defaultValue(Double.NaN));
        public AttrDouble infValue =
            attributes.register(
                "infValue", AttrDouble.builder().defaultValue(Double.POSITIVE_INFINITY));
      }
  
      AliasMapper mapper = new AliasMapper();
      mapper.alias("clazz", Clazz.class, () -> new Clazz());
  
      Clazz ob = new Clazz();
      ob.otherValue.set(36.6);
  
      Assertions.assertThat(Attrs.toMap(ob, mapper::toName))
          .containsEntry("defValue", 36.6d)
          .containsEntry("nullValue", null)
          .containsEntry("otherValue", 36.6d)
          .containsEntry("nanValue", Double.NaN)
          .containsEntry("infValue", Double.POSITIVE_INFINITY);
  
      Clazz clazz = Attrs.fromMap(Clazz.class, Attrs.toMap(ob, mapper::toName), mapper::fromName);
      Assertions.assertThat(clazz.defValue.get()).isEqualTo(36.6d);
      Assertions.assertThat(clazz.nullValue.get()).isNull();
      Assertions.assertThat(clazz.otherValue.get()).isEqualTo(36.6d);
      Assertions.assertThat(clazz.nanValue.get()).isEqualTo(Double.NaN);
      Assertions.assertThat(clazz.infValue.get()).isEqualTo(Double.POSITIVE_INFINITY);
    }
test_case.class_method_signature: AttrDoubleTest.testToFromMap()
test_case.full_signature: @Test public void testToFromMap()
test_case.identifier: testToFromMap
test_case.invocations: register defaultValue builder register defaultValue builder register defaultValue builder register defaultValue builder register defaultValue builder alias set containsEntry containsEntry containsEntry containsEntry containsEntry assertThat toMap fromMap toMap isEqualTo assertThat get isNull assertThat get isEqualTo assertThat get isEqualTo assertThat get isEqualTo assertThat get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testToFromMap()
focal_class.file: core/src/main/java/org/carrot2/attrs/AttrDouble.java
focal_class.identifier: AttrDouble
focal_class.class_method_signature: AttrDouble.AttrDouble(
        Double value, List<? extends Constraint<? super Double>> constraint, String label)
focal_class.full_signature: private  AttrDouble(
        Double value, List<? extends Constraint<? super Double>> constraint, String label)
focal_class.identifier: AttrDouble
focal_class.modifiers: private
focal_class.parameters: (
        Double value, List<? extends Constraint<? super Double>> constraint, String label)
focal_class.signature:  AttrDouble(
        Double value, List<? extends Constraint<? super Double>> constraint, String label)
focal_class.class_method_signature: AttrDouble.builder()
focal_class.full_signature: public static Builder builder()
focal_class.identifier: builder
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Builder
focal_class.signature: Builder builder()
focal_class.superclass: extends Attr<Double>
focal_method.body: public static Builder builder() {
      return new Builder();
    }
focal_method.class_method_signature: AttrDouble.builder()
focal_method.full_signature: public static Builder builder()
focal_method.identifier: builder
focal_method.modifiers: public static
focal_method.parameters: ()
focal_method.return: Builder
focal_method.signature: Builder builder()