public static <T, S extends T> boolean addIfAbsent(Collection<T> collection, S object) {
		if (object == null || collection == null || collection.contains(object)) {
			return false;
		}

		return collection.add(object);
	}
@Test
	public void addIfAbsentTest() {
		// 为false的情况
		assertFalse(CollUtil.addIfAbsent(null, null));
		assertFalse(CollUtil.addIfAbsent(CollUtil.newArrayList(), null));
		assertFalse(CollUtil.addIfAbsent(null, "123"));
		assertFalse(CollUtil.addIfAbsent(CollUtil.newArrayList("123"), "123"));
		assertFalse(CollUtil.addIfAbsent(CollUtil.newArrayList(new Animal("jack", 20)),
			new Animal("jack", 20)));

		// 正常情况
		assertTrue(CollUtil.addIfAbsent(CollUtil.newArrayList("456"), "123"));
		assertTrue(CollUtil.addIfAbsent(CollUtil.newArrayList(new Animal("jack", 20)),
			new Dog("jack", 20)));
		assertTrue(CollUtil.addIfAbsent(CollUtil.newArrayList(new Animal("jack", 20)),
			new Animal("tom", 20)));
	}