diff src/treecms/tree/util/NodeChildrenImpl.java @ 17:168deb591f21

commit
author shoshi
date Tue, 24 May 2011 00:33:12 +0900
parents bb9760760744
children 084de6909451
line wrap: on
line diff
--- a/src/treecms/tree/util/NodeChildrenImpl.java	Sat May 21 04:46:00 2011 +0900
+++ b/src/treecms/tree/util/NodeChildrenImpl.java	Tue May 24 00:33:12 2011 +0900
@@ -24,6 +24,16 @@
 		m_set = new HashSet<String>();
 	}
 	
+	public NodeChildrenImpl(T... _args)
+	{
+		this();
+		for(T i : _args){
+			if(!add(i)){
+				throw new IllegalArgumentException("duplicate Node UUID at "+i.getID().getUUID());
+			}
+		}
+	}
+	
 	public NodeChildrenImpl(NodeChildren<T> _list)
 	{
 		this();
@@ -86,6 +96,7 @@
 			//共通要素がない
 			m_set.addAll(_list.getUUIDSet());
 			m_list.addAll(_list.getList());
+			return true;
 		}
 		return false;
 	}
@@ -222,9 +233,4 @@
 		result = 37*result + m_set.hashCode();
 		return result;
 	}
-	
-	public static NodeChildren<? extends Node<?>> hoge(Node<?> hoge)
-	{
-		return null;
-	}
 }