Add Java Image process
This commit is contained in:
+26
@@ -2,9 +2,12 @@ package com.ossez.java.lists;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ListToStringUnitTest {
|
||||
@@ -27,5 +30,28 @@ public class ListToStringUnitTest {
|
||||
public void whenStringUtilsJoin_thenPrintCustom() {
|
||||
List<Integer> intList = Arrays.asList(1, 2, 3);
|
||||
System.out.println(StringUtils.join(intList, "|"));
|
||||
|
||||
// Object obj1 = new Integer(100);
|
||||
// System.out.println(obj1.toString());
|
||||
|
||||
// ToStringBuilder.reflectionToString(intList);
|
||||
|
||||
Country country = new Country("United States", "North America", 4000000);
|
||||
System.out.println(ReflectionToStringBuilder.toString(intList));
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Country {
|
||||
private String name;
|
||||
private String continent;
|
||||
private int population;
|
||||
|
||||
public Country(String name, String continent, int population) {
|
||||
this.name = name;
|
||||
this.continent = continent;
|
||||
this.population = population;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>${version.log4j}</version>
|
||||
<version>${log4j.version}</version>
|
||||
</dependency>
|
||||
<!-- test scoped -->
|
||||
<dependency>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>${version.log4j}</version>
|
||||
<version>${log4j.version}</version>
|
||||
</dependency>
|
||||
<dependency> <!-- needed to bridge to slf4j for projects that use the log4j APIs directly -->
|
||||
<groupId>org.slf4j</groupId>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>${version.log4j}</version>
|
||||
<version>${log4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
|
||||
Reference in New Issue
Block a user