blob: 21e3ff3b3f015c38d31717e837bb2cd4c72df64c [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2015, 2018 Stephan Wahlbrink and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
#=============================================================================*/
package org.eclipse.statet.docmlet.wikitext.core.source;
import org.eclipse.statet.jcommons.lang.Nullable;
import org.eclipse.statet.jcommons.text.core.BasicTextRegion;
import org.eclipse.statet.ltk.ast.core.StatusDetail;
public class LabelInfo extends BasicTextRegion {
private final String label;
public LabelInfo(final String label, final int startOffset, final int endOffset) {
super(startOffset, endOffset);
this.label= label;
}
public String getLabel() {
return this.label;
}
@Override
public boolean equals(final @Nullable Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof StatusDetail) {
final LabelInfo other= (LabelInfo) obj;
return (equalsByOffsets(other)
&& this.label.equals(other.label) );
}
return false;
}
}