rcp: Rename plugins to org.eclipse.tracecompass
[deliverable/tracecompass.git] / org.eclipse.tracecompass.pcap.core / src / org / eclipse / linuxtools / internal / pcap / core / protocol / unknown / UnknownEndpoint.java
CommitLineData
5255c030
VP
1/*******************************************************************************
2 * Copyright (c) 2014 Ericsson
3 *
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 *
9 * Contributors:
10 * Vincent Perot - Initial API and implementation
11 *******************************************************************************/
12
93d1d135 13package org.eclipse.linuxtools.internal.pcap.core.protocol.unknown;
5255c030
VP
14
15import org.eclipse.jdt.annotation.Nullable;
93d1d135 16import org.eclipse.linuxtools.internal.pcap.core.endpoint.ProtocolEndpoint;
5255c030
VP
17
18/**
19 * Class that extends the {@link ProtocolEndpoint} class. It represents the
20 * endpoint for a protocol that is unknown.
21 *
22 * @author Vincent Perot
23 */
24public class UnknownEndpoint extends ProtocolEndpoint {
25
26 /**
27 * Constructor of the {@link UnknownEndpoint} class. It takes a packet to
28 * get its endpoint. Since every packet has two endpoints (source and
29 * destination), the isSourceEndpoint parameter is used to specify which
30 * endpoint to take.
31 *
32 * @param packet
33 * The packet that contains the endpoints.
34 * @param isSourceEndpoint
35 * Whether to take the source or the destination endpoint of the
36 * packet.
37 */
38 public UnknownEndpoint(UnknownPacket packet, boolean isSourceEndpoint) {
39 super(packet, isSourceEndpoint);
40 }
41
42 @Override
43 public int hashCode() {
44 return 0;
45 }
46
47 @Override
48 public String toString() {
49 return EMPTY_STRING;
50 }
51
52 @Override
53 public boolean equals(@Nullable Object obj) {
b07bcec1
VP
54 if (this == obj) {
55 return true;
56 }
5255c030
VP
57 return false;
58 }
59}
This page took 0.031435 seconds and 5 git commands to generate.