This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Collection; | |
import java.util.HashSet; | |
import java.util.Iterator; | |
/** | |
* 展示了 Collection 的拷贝构造函数可用于浅拷贝, | |
* 并提供了通过迭代来对集合进行深拷贝的技术。 | |
* | |
* @author tequlia2pop | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.math.BigDecimal; | |
import java.util.Date; | |
import org.apache.commons.lang3.builder.CompareToBuilder; | |
import org.apache.commons.lang3.builder.ToStringBuilder; | |
import org.apache.commons.lang3.builder.ToStringStyle; | |
public class PoliticalCandidate implements Comparable<PoliticalCandidate> { | |
private String lastName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.gmail.tequlia2pop.junit; | |
import static org.hamcrest.CoreMatchers.everyItem; | |
import static org.hamcrest.CoreMatchers.hasItems; | |
import static org.hamcrest.CoreMatchers.is; | |
import static org.hamcrest.CoreMatchers.not; | |
import static org.junit.Assert.assertThat; | |
import java.util.ArrayList; | |
import java.util.Arrays; |