 }
 
 public class ParentCell<Value>: ParentCellProtocol {
-    private(set) var value: Value
-    private(set) var isExpand = false
-    private(set) var childs = [(index: Int, isHidden: Bool)]()
+    private(set) public var value: Value
+    private(set) public var isExpand = false
+    private(set) public var childs = [(index: Int, isHidden: Bool)]()
     
-    init(value: Value) {
+    public init(value: Value) {
         self.value = value
     }
     
-    func append(childIndex: Int) {
+    public func append(childIndex: Int) {
         childs.append((index: childIndex, isHidden: true))
     }
     
-    func select() {
+    public func select() {
         isExpand = !isExpand
         childs = childs.map({(index: $0.index, isHidden: !$0.isHidden)})
     }
     
-    func isHidden(childIndex: Int) -> Bool {
+    public func isHidden(childIndex: Int) -> Bool {
         return childs.filter({$0.index == childIndex}).first?.isHidden ?? true
     }
 }

}

public class ChildCell<Value>: ChildCellProtocol {
    private(set) var parentIndex: Int?
    private(set) var value: Value
    
    init(parentIndex: Int?, value: Value) {
        self.parentIndex = parentIndex
        self.value = value
    }

import UIKit

public class ExpandCollapseTableViewModel<Parent: ParentTypeProtocol, Child: ChildTypeProtocol> {
    private(set) public var items = [CellType<Parent, Child>]()
    private var isMultipleExpand: Bool
    
    public init(isMultipleExpand: Bool = false) {
        self.isMultipleExpand = isMultipleExpand
    }
    
    public func removeAll() {
        items.removeAll()
    }
    
    public func append(child: Child) {
        items.append(CellType.Child(child))
    }
    
    public func append(parent: Parent, completion: (Int) -> [Child]) {
        let parentIndex = items.count
        items.append(.Parent(parent))
        let childs = completion(parentIndex)
