1 /*******************************************************************************
2 * Copyright (c) 2013, 2014 Ericsson
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
10 * Matthew Khouzam - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.tmf
.core
.project
.model
;
15 import java
.util
.Objects
;
18 * Trace import helper class
20 * @author Matthew Khouzam
21 * @deprecated Use TmfTraceType.getTraceTypeHelpers and
22 * {@link TraceTypeHelper#validate(String)} or
23 * {@link TraceTypeHelper#validateWithConfidence(String)}
26 public class TraceValidationHelper
implements Comparable
<TraceValidationHelper
> {
28 private final String fTraceToScan
;
29 private final String fTraceType
;
32 * Trace To validate constructor
35 * the path of the trace
37 * the trace type of the trace to add (canonical name)
39 public TraceValidationHelper(String traceToScan
, String traceType
) {
40 this.fTraceToScan
= traceToScan
;
41 this.fTraceType
= traceType
;
45 * @return the trace filename
47 public String
getTraceToScan() {
52 * @return the trace type canonical name
54 public String
getTraceType() {
59 public int hashCode() {
62 result
= prime
* result
+ ((fTraceToScan
== null) ?
0 : fTraceToScan
.hashCode());
63 result
= prime
* result
+ ((fTraceType
== null) ?
0 : fTraceType
.hashCode());
68 public boolean equals(Object obj
) {
75 if (!(obj
instanceof TraceValidationHelper
)) {
78 TraceValidationHelper other
= (TraceValidationHelper
) obj
;
79 if (!Objects
.equals(fTraceToScan
, other
.fTraceToScan
)) {
82 if(!Objects
.equals(fTraceType
, other
.fTraceType
)){
89 public int compareTo(TraceValidationHelper o
) {
90 int retVal
= fTraceToScan
.compareTo(o
.getTraceToScan());
92 retVal
= fTraceType
.compareTo(o
.fTraceType
);