Autopsy  4.19.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
BarChartSeries.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.datasourcesummary.uiutils;
20 
21 import java.awt.Color;
22 import java.util.Collections;
23 import java.util.List;
24 
28 public class BarChartSeries {
29 
33  public static class BarChartItem {
34 
35  private final Comparable<?> key;
36  private final double value;
37 
44  public BarChartItem(Comparable<?> key, double value) {
45  this.key = key;
46  this.value = value;
47  }
48 
52  public Comparable<?> getKey() {
53  return key;
54  }
55 
59  public double getValue() {
60  return value;
61  }
62  }
63  private final Comparable<?> key;
64  private final Color color;
65  private final List<BarChartItem> items;
66 
74  public BarChartSeries(Comparable<?> key, Color color, List<BarChartItem> items) {
75  this.key = key;
76  this.color = color;
77  this.items = (items == null) ? Collections.emptyList() : Collections.unmodifiableList(items);
78  }
79 
83  public Color getColor() {
84  return color;
85  }
86 
90  public List<BarChartItem> getItems() {
91  return items;
92  }
93 
97  public Comparable<?> getKey() {
98  return key;
99  }
100 
101 }
BarChartSeries(Comparable<?> key, Color color, List< BarChartItem > items)

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.