Mercurial > hg > Members > shoshi > TreeCMSv2
view src/treecms/api/MonotonicTreeNode.java @ 12:fbbb7e414346
modified OnMemoryNode,OnMemoryTreeNode,OnMemoryMonotonicTreeNode
author | shoshi |
---|---|
date | Wed, 11 May 2011 03:34:01 +0900 |
parents | 85061e874775 |
children | 8bf59f161b23 |
line wrap: on
line source
package treecms.api; import java.nio.ByteBuffer; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; /** * NodeのDoubleLinkedな実装です.SingleLinkedとは違いNodeの親情報まで保持します. * TreeNodeとは違い、この実装は木を非破壊的に編集します. * @author shoshi */ public interface MonotonicTreeNode { /* * 属性関連のメソッド */ public ByteBuffer get(ByteBuffer _key); public Map<ByteBuffer,ByteBuffer> getAll(); public void put(ByteBuffer _key,ByteBuffer _value); public void putAll(Map<ByteBuffer,ByteBuffer> _map); public void remove(ByteBuffer _key); public void removeAll(Set<ByteBuffer> _keys); public void clear(); /* * 子供関連のメソッド */ public Iterator<MonotonicTreeNode> getChildren(); public void addChild(MonotonicTreeNode _n); public void addChildren(List<MonotonicTreeNode> _list); public void removeChild(MonotonicTreeNode _n); public void removeChildren(List<MonotonicTreeNode> _list); public void clearChildren(); /* * 親関連のメソッド */ public NodeID getID(); public Forest getForest(); public MonotonicTreeNode getParent(); public Node getNode(); }