All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.norberg.automatter.example.ComplexGenericExample Maven / Gradle / Ivy

package io.norberg.automatter.example;

import java.io.IOException;
import java.util.List;

import static java.util.Arrays.asList;

public class ComplexGenericExample {

  public static void main(final String... args) throws IOException {
    final ComplexGenericFoobar, ComparableList> foobar =
        new ComplexGenericFoobarBuilder, ComparableList>()
            .foo("foo")
            .bar(17)
            .baz(asList(13, 4711))
            .quux(ComparableList.of(1, 2, 3))
            .name("generics")
            .build();

    System.out.println(foobar);

    final ComplexGenericFoobarBuilder, ComparableList> builder =
        ComplexGenericFoobarBuilder., ComparableList>from(foobar);

    final ComplexGenericFoobar, ComparableList> foobar2 = builder.build();

    System.out.println(foobar2);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy