本文整理了Java中org.eclipse.lsp4j.jsonrpc.messages.Either.equals()
方法的一些代码示例,展示了Either.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Either.equals()
方法的具体详情如下:
包路径:org.eclipse.lsp4j.jsonrpc.messages.Either
类名称:Either
方法名:equals
暂无
代码示例来源:origin: org.eclipse.lsp4j/org.eclipse.lsp4j.jsonrpc
@Override
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
CancelParams other = (CancelParams) obj;
if (this.id == null) {
if (other.id != null)
return false;
} else if (!this.id.equals(other.id))
return false;
return true;
}
代码示例来源:origin: eclipse/lsp4j
@Override
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
CancelParams other = (CancelParams) obj;
if (this.id == null) {
if (other.id != null)
return false;
} else if (!this.id.equals(other.id))
return false;
return true;
}
代码示例来源:origin: org.eclipse.lsp4j/org.eclipse.lsp4j.jsonrpc
@Override
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
if (!super.equals(obj))
return false;
IdentifiableMessage other = (IdentifiableMessage) obj;
if (this.id == null) {
if (other.id != null)
return false;
} else if (!this.id.equals(other.id))
return false;
return true;
}
代码示例来源:origin: eclipse/lsp4j
@Override
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
if (!super.equals(obj))
return false;
IdentifiableMessage other = (IdentifiableMessage) obj;
if (this.id == null) {
if (other.id != null)
return false;
} else if (!this.id.equals(other.id))
return false;
return true;
}
代码示例来源:origin: eclipse/lsp4j
@Override
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
if (!super.equals(obj))
return false;
DebugNotificationMessage other = (DebugNotificationMessage) obj;
if (this.id == null) {
if (other.id != null)
return false;
} else if (!this.id.equals(other.id))
return false;
return true;
}
代码示例来源:origin: org.eclipse.lsp4j/org.eclipse.lsp4j
@Override
@Pure
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
WorkspaceFoldersOptions other = (WorkspaceFoldersOptions) obj;
if (this.supported == null) {
if (other.supported != null)
return false;
} else if (!this.supported.equals(other.supported))
return false;
if (this.changeNotifications == null) {
if (other.changeNotifications != null)
return false;
} else if (!this.changeNotifications.equals(other.changeNotifications))
return false;
return true;
}
代码示例来源:origin: eclipse/lsp4j
@Override
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
if (!super.equals(obj))
return false;
DebugResponseMessage other = (DebugResponseMessage) obj;
if (this.responseId == null) {
if (other.responseId != null)
return false;
} else if (!this.responseId.equals(other.responseId))
return false;
if (this.method == null) {
if (other.method != null)
return false;
} else if (!this.method.equals(other.method))
return false;
return true;
}
代码示例来源:origin: eclipse/lsp4j
@Override
@Pure
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
WorkspaceFoldersOptions other = (WorkspaceFoldersOptions) obj;
if (this.supported == null) {
if (other.supported != null)
return false;
} else if (!this.supported.equals(other.supported))
return false;
if (this.changeNotifications == null) {
if (other.changeNotifications != null)
return false;
} else if (!this.changeNotifications.equals(other.changeNotifications))
return false;
return true;
}
代码示例来源:origin: org.eclipse.lsp4j/org.eclipse.lsp4j
@Override
@Pure
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
ParameterInformation other = (ParameterInformation) obj;
if (this.label == null) {
if (other.label != null)
return false;
} else if (!this.label.equals(other.label))
return false;
if (this.documentation == null) {
if (other.documentation != null)
return false;
} else if (!this.documentation.equals(other.documentation))
return false;
return true;
}
代码示例来源:origin: eclipse/lsp4j
@Override
@Pure
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
ParameterInformation other = (ParameterInformation) obj;
if (this.label == null) {
if (other.label != null)
return false;
} else if (!this.label.equals(other.label))
return false;
if (this.documentation == null) {
if (other.documentation != null)
return false;
} else if (!this.documentation.equals(other.documentation))
return false;
return true;
}
代码示例来源:origin: org.eclipse.lsp4j/org.eclipse.lsp4j
@Override
@Pure
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
SignatureInformation other = (SignatureInformation) obj;
if (this.label == null) {
if (other.label != null)
return false;
} else if (!this.label.equals(other.label))
return false;
if (this.documentation == null) {
if (other.documentation != null)
return false;
} else if (!this.documentation.equals(other.documentation))
return false;
if (this.parameters == null) {
if (other.parameters != null)
return false;
} else if (!this.parameters.equals(other.parameters))
return false;
return true;
}
代码示例来源:origin: eclipse/lsp4j
@Override
@Pure
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
SignatureInformation other = (SignatureInformation) obj;
if (this.label == null) {
if (other.label != null)
return false;
} else if (!this.label.equals(other.label))
return false;
if (this.documentation == null) {
if (other.documentation != null)
return false;
} else if (!this.documentation.equals(other.documentation))
return false;
if (this.parameters == null) {
if (other.parameters != null)
return false;
} else if (!this.parameters.equals(other.parameters))
return false;
return true;
}
代码示例来源:origin: org.eclipse.lsp4j/org.eclipse.lsp4j
@Override
@Pure
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Hover other = (Hover) obj;
if (this.contents == null) {
if (other.contents != null)
return false;
} else if (!this.contents.equals(other.contents))
return false;
if (this.range == null) {
if (other.range != null)
return false;
} else if (!this.range.equals(other.range))
return false;
return true;
}
代码示例来源:origin: eclipse/lsp4j
@Override
@Pure
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Hover other = (Hover) obj;
if (this.contents == null) {
if (other.contents != null)
return false;
} else if (!this.contents.equals(other.contents))
return false;
if (this.range == null) {
if (other.range != null)
return false;
} else if (!this.range.equals(other.range))
return false;
return true;
}
代码示例来源:origin: eclipse/lsp4j
if (other.moduleId != null)
return false;
} else if (!this.moduleId.equals(other.moduleId))
return false;
if (this.presentationHint == null) {
代码示例来源:origin: eclipse/lsp4j
@Test
public void testEqualsFalseWithNonNull() {
Either<Object, String> either1 = Either.forLeft("Testing");
Either<Object, String> either2 = Either.forRight("Testing");
assertFalse(either1.equals(either2));
}
代码示例来源:origin: eclipse/lsp4j
@Test
public void testEqualsForNull() {
Either<Object, Object> either1 = Either.forLeft(null);
Either<Object, Object> either2 = Either.forLeft(null);
assertTrue(either1.equals(either2));
}
代码示例来源:origin: eclipse/lsp4j
@Test
public void testLeftEqualsNull() {
Either<Object, String> either1 = Either.forRight("Testing");
Either<Object, String> either2 = Either.forRight("Testing");
assertTrue(either1.equals(either2));
}
代码示例来源:origin: eclipse/lsp4j
@Test
public void testRightEqualsNull() {
Either<Object, String> either1 = Either.forLeft("Testing");
Either<Object, String> either2 = Either.forLeft("Testing");
assertTrue(either1.equals(either2));
}
代码示例来源:origin: org.eclipse.che.core/che-core-api-languageserver
return left;
if (left.equals(right)) {
return left;
内容来源于网络,如有侵权,请联系作者删除!