org.apache.logging.log4j.Marker.equals()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中org.apache.logging.log4j.Marker.equals()方法的一些代码示例,展示了Marker.equals()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Marker.equals()方法的具体详情如下:
包路径:org.apache.logging.log4j.Marker
类名称:Marker
方法名:equals

Marker.equals介绍

[英]Returns true if the given marker has the same name as this marker.
[中]如果给定标记与此标记同名,则返回true。

代码示例

代码示例来源:origin: org.apache.logging.log4j/log4j-slf4j-impl

@Override
public boolean equals(final Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null) {
    return false;
  }
  if (!(obj instanceof Log4jMarker)) {
    return false;
  }
  final Log4jMarker other = (Log4jMarker) obj;
  if (marker == null) {
    if (other.marker != null) {
      return false;
    }
  } else if (!marker.equals(other.marker)) {
    return false;
  }
  return true;
}

代码示例来源:origin: org.apache.logging.log4j/log4j-api

if (localParents[0].equals(parent)) {
  parents = null;
  return true;
if (!marker.equals(parent)) {
  if (index == localParentsLength - 1) {

代码示例来源:origin: org.apache.logging.log4j/log4j-slf4j18-impl

@Override
public boolean equals(final Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj == null) {
    return false;
  }
  if (!(obj instanceof Log4jMarker)) {
    return false;
  }
  final Log4jMarker other = (Log4jMarker) obj;
  if (marker == null) {
    if (other.marker != null) {
      return false;
    }
  } else if (!marker.equals(other.marker)) {
    return false;
  }
  return true;
}

代码示例来源:origin: ops4j/org.ops4j.pax.logging

if (localParents[0].equals(parent)) {
  parents = null;
  return true;
if (!marker.equals(parent)) {
  if (index == localParentsLength - 1) {

代码示例来源:origin: ops4j/org.ops4j.pax.logging

return false;
if (marker != null ? !marker.equals(that.marker) : that.marker != null) {
  return false;

相关文章