1 /*******************************************************************************
2 * Copyright (c) 2016 EfficiOS Inc., Jonathan Rajotte-Julien
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.internal
.provisional
.analysis
.lami
.core
.module
;
12 import java
.util
.Objects
;
14 import org
.eclipse
.jdt
.annotation
.Nullable
;
15 import org
.eclipse
.tracecompass
.internal
.provisional
.analysis
.lami
.core
.aspect
.LamiTableEntryAspect
;
18 * Description of a series to use in LAMI charts.
20 * Contains the aspects to use on the X and Y axes (one per axis).
22 * @author Jonathan Rajotte-Julien
24 public class LamiXYSeriesDescription
{
26 private final LamiTableEntryAspect fXAspect
;
27 private final LamiTableEntryAspect fYAspect
;
33 * The aspect to use on the X axis
35 * The aspect to use on the Y axis
37 public LamiXYSeriesDescription(LamiTableEntryAspect xAspect
, LamiTableEntryAspect yAspect
) {
43 * Get the aspect corresponding to the X axis.
45 * @return The X-axis aspect
47 public LamiTableEntryAspect
getXAspect() {
52 * Get the aspect corresponding to the Y axis.
54 * @return The Y-axis aspect
56 public LamiTableEntryAspect
getYAspect() {
62 public String
toString() {
63 return "x:" + fXAspect
.getLabel() + " y:" + fYAspect
.getLabel(); //$NON-NLS-1$ //$NON-NLS-2$
67 public int hashCode() {
68 return Objects
.hash(fXAspect
, fYAspect
);
72 public boolean equals(@Nullable Object obj
) {
79 if (getClass() != obj
.getClass()) {
82 LamiXYSeriesDescription other
= (LamiXYSeriesDescription
) obj
;
83 if (!fXAspect
.equals(other
.fXAspect
)) {
86 if (!fYAspect
.equals(other
.fYAspect
)) {