Autopsy  3.1
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  T visit(VirtualDirectoryNode lcn);
33  T visit(VolumeNode vn);
34  T visit(DirectoryNode dn);
35  T visit(FileNode fn);
36  T visit(LayoutFileNode lcn);
37  T visit(LocalFileNode dfn);
38 
39 
40 
46  static abstract class Default<T> implements ContentNodeVisitor<T> {
47 
53  protected abstract T defaultVisit(ContentNode c);
54 
55  @Override
56  public T visit(DirectoryNode dn) {
57  return defaultVisit(dn);
58  }
59 
60  @Override
61  public T visit(FileNode fn) {
62  return defaultVisit(fn);
63  }
64 
65  @Override
66  public T visit(ImageNode in) {
67  return defaultVisit(in);
68  }
69 
70  @Override
71  public T visit(VolumeNode vn) {
72  return defaultVisit(vn);
73  }
74 
75  @Override
76  public T visit(LayoutFileNode lcn) {
77  return defaultVisit(lcn);
78  }
79 
80  @Override
81  public T visit(LocalFileNode dfn) {
82  return defaultVisit(dfn);
83  }
84 
85  @Override
86  public T visit(VirtualDirectoryNode ldn) {
87  return defaultVisit(ldn);
88  }
89  }
90 }

Copyright © 2012-2015 Basis Technology. Generated on: Mon Oct 19 2015
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.