Autopsy  4.19.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
TableFilterChildrenWithDescendants.java
Go to the documentation of this file.
1 /*
2  *
3  * Autopsy Forensic Browser
4  *
5  * Copyright 2018 Basis Technology Corp.
6  * Contact: carrier <at> sleuthkit <dot> org
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 package org.sleuthkit.autopsy.corecomponents;
21 
22 import org.openide.nodes.Children;
23 import org.openide.nodes.Node;
24 
29 final class TableFilterChildrenWithDescendants extends TableFilterChildren {
30 
31  private final int childLayerDepth;
32 
40  private TableFilterChildrenWithDescendants(Node wrappedNode, int childLayerDepth) {
41  super(wrappedNode);
42  this.childLayerDepth = childLayerDepth;
43  }
44 
53  public static Children createInstance(Node wrappedNode, int childLayerDepth){
54  if(childLayerDepth == 0){
55  return Children.LEAF;
56  } else {
57  return new TableFilterChildrenWithDescendants(wrappedNode, childLayerDepth - 1);
58  }
59  }
60 
61  @Override
62  protected Node copyNode(Node nodeToCopy){
63  return new TableFilterNode(nodeToCopy, this.childLayerDepth);
64  }
65 }

Copyright © 2012-2021 Basis Technology. Generated on: Fri Aug 6 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.