Autopsy  4.19.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
SectionData.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2021 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.contentviewers.osaccount;
20 
21 import java.util.ArrayList;
22 import java.util.Iterator;
23 import java.util.List;
24 
29 final class SectionData implements Iterable<SectionData.RowData<String, String>> {
30 
31  private final String title;
32  private final List<RowData<String, String>> data;
33 
39  SectionData(String title) {
40  this.title = title;
41  this.data = new ArrayList<>();
42  }
43 
49  String getTitle() {
50  return title;
51  }
52 
59  void addData(String properytName, String propertyValue) {
60  data.add(new RowData<>(properytName, propertyValue));
61  }
62 
63  @Override
64  public Iterator<RowData<String, String>> iterator() {
65  return data.iterator();
66  }
67 
74  static class RowData<K, V> {
75 
76  private final K key;
77  private final V value;
78 
85  RowData(K key, V value) {
86  this.key = key;
87  this.value = value;
88  }
89 
95  K getKey() {
96  return key;
97  }
98 
104  V getValue() {
105  return value;
106  }
107  }
108 }

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