         }
     }
     
-    func heightForRow(indexPath: NSIndexPath) -> CGFloat? {
+    public func heightForRow(indexPath: NSIndexPath) -> CGFloat? {
         let childIndex = indexPath.row
         
         if case .Child(let child) = items[childIndex],
             let parentIndex = child.get.child.parentIndex,
             case .Parent(let parent) = items[parentIndex]
-            where parent.get.parent.isHidden(childIndex)
         {
-            return 0
+            if parent.get.parent.isHidden(childIndex) {
+                return 0
+            }
         }
         
         return nil
     }
     
-    var expandCollapse: (NSIndexPath, (Child) -> Void) -> [NSIndexPath] {
+    public var expandCollapse: (NSIndexPath, (Child) -> Void) -> [NSIndexPath] {
         return isMultipleExpand ? multipleExpandCollapse : singleExpandCollapse
     }
     

}

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
    }

}

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