Autopsy  4.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
ContentNodeVisitor.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.datamodel;
20 
29 interface ContentNodeVisitor<T> {
30 
31  T visit(ImageNode in);
32 
33  T visit(VirtualDirectoryNode lcn);
34 
35  T visit(VolumeNode vn);
36 
37  T visit(DirectoryNode dn);
38 
39  T visit(FileNode fn);
40 
41  T visit(LayoutFileNode lcn);
42 
43  T visit(LocalFileNode dfn);
44 
51  static abstract class Default<T> implements ContentNodeVisitor<T> {
52 
60  protected abstract T defaultVisit(ContentNode c);
61 
62  @Override
63  public T visit(DirectoryNode dn) {
64  return defaultVisit(dn);
65  }
66 
67  @Override
68  public T visit(FileNode fn) {
69  return defaultVisit(fn);
70  }
71 
72  @Override
73  public T visit(ImageNode in) {
74  return defaultVisit(in);
75  }
76 
77  @Override
78  public T visit(VolumeNode vn) {
79  return defaultVisit(vn);
80  }
81 
82  @Override
83  public T visit(LayoutFileNode lcn) {
84  return defaultVisit(lcn);
85  }
86 
87  @Override
88  public T visit(LocalFileNode dfn) {
89  return defaultVisit(dfn);
90  }
91 
92  @Override
93  public T visit(VirtualDirectoryNode ldn) {
94  return defaultVisit(ldn);
95  }
96  }
97 }

Copyright © 2012-2015 Basis Technology. Generated on: Wed Apr 6 2016
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.