org.geotools.resources.Utilities.equals()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(87)

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

Utilities.equals介绍

[英]Convenience method for testing two objects for equality. One or both objects may be null.
[中]测试两个物体是否相等的简便方法。一个或两个对象可能为空。

代码示例

代码示例来源:origin: org.geotools/gt2-main

public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj instanceof AnchorPointImpl) {
    AnchorPointImpl other = (AnchorPointImpl) obj;
    return Utilities.equals(this.anchorPointX, other.anchorPointX)
    && Utilities.equals(this.anchorPointY, other.anchorPointY);
  }
  return false;
}

代码示例来源:origin: org.geotools/gt2-main

public boolean equals(Object obj) {
   if (this == obj) {
    return true;
  }
    
  if (obj instanceof ImageOutlineImpl) {
    ImageOutlineImpl other = (ImageOutlineImpl) obj;
    return Utilities.equals(symbolizer, other.symbolizer);
  }
  
  return false;
}

代码示例来源:origin: org.geotools/gt2-main

public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  
  if (obj instanceof FeatureTypeConstraintImpl) {
    LayerFeatureConstraintsImpl other = (LayerFeatureConstraintsImpl)obj;
    return Utilities.equals(constraints,other.constraints);
  }
  
  return false;
}

代码示例来源:origin: org.geotools/gt2-main

public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj instanceof ExtentImpl) {
    ExtentImpl other = (ExtentImpl) obj;
    return Utilities.equals(this.name, other.name)
    && Utilities.equals(this.value, other.value);
  }
  return false;
}

代码示例来源:origin: org.geotools/gt2-main

public boolean equals(Object obj) {
  if ( obj instanceof Key ) {
    Key other = (Key) obj;
    return Utilities.equals( resolve, other.resolve) && 
      Utilities.equals( adaptee, other.adaptee );
  }
  
  return false;
}

代码示例来源:origin: org.geotools/gt2-main

public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj instanceof LinePlacementImpl) {
    LinePlacementImpl other = (LinePlacementImpl) obj;
    return Utilities.equals(perpendicularOffset,
      other.perpendicularOffset);
  }
  return false;
}

代码示例来源:origin: org.geotools/gt2-main

public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj instanceof DisplacementImpl) {
    DisplacementImpl other = (DisplacementImpl) obj;
    return Utilities.equals(displacementX, other.displacementX)
    && Utilities.equals(displacementY, other.displacementY);
  }
  return false;
}

代码示例来源:origin: org.geotools/gt2-widgets-swing

/**
 * Compares this element with the specified object for equality.
 */
public boolean equals(final Object other) {
  if (other instanceof ListElement) {
    final ListElement that = (ListElement) other;
    return Utilities.equals(this.element, that.element) &&
        Utilities.equals(this.string,  that.string);
  }
  return false;
}

代码示例来源:origin: org.geotools/gt2-main

public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj instanceof PointPlacementImpl) {
    PointPlacementImpl other = (PointPlacementImpl) obj;
    return Utilities.equals(anchorPoint, other.anchorPoint)
    && Utilities.equals(displacement, other.displacement)
    && Utilities.equals(rotation, other.rotation);
  }
  return false;
}

代码示例来源:origin: org.geotools/gt2-coverage

/**
 * Compares the specified object with this grid geometry for equality.
 */
public boolean equals(final Object object) {
  if (object!=null && object.getClass().equals(getClass())) {
    final GeneralGridGeometry that = (GeneralGridGeometry) object;
    return Utilities.equals(this.gridRange, that.gridRange) &&
        Utilities.equals(this.gridToCRS, that.gridToCRS) &&
        Utilities.equals(this.envelope , that.envelope );
  }
  return false;
}

代码示例来源:origin: org.geotools/gt2-coverageio

/**
   * Compares the specified object with this identification for equality.
   */
  public boolean equals(final Object object) {
    if (object!=null && object.getClass().equals(getClass())) {
      final Identification that = (Identification) object;
      return Utilities.equals(this.name, that.name) &&
          Utilities.equals(this.type, that.type);
    }
    return false;
  }
}

代码示例来源:origin: org.geotools/gt2-metadata

/**
 * Compares this international string with the specified object for equality.
 */
public boolean equals(final Object object) {
  if (object!=null && object.getClass().equals(getClass())) {
    final SimpleInternationalString that = (SimpleInternationalString) object;
    return Utilities.equals(this.defaultValue, that.defaultValue);
  }
  return false;
}

代码示例来源:origin: org.geotools/gt2-api

/**
 * Compares the specified object with this envelope for equality.
 */
public boolean equals(final Object object) {
  if (super.equals(object)) {
    final CoordinateReferenceSystem otherCRS = (object instanceof ReferencedEnvelope)
      ? ((ReferencedEnvelope) object).crs : null;
    return Utilities.equals(crs, otherCRS);
  }
  return false;
}

代码示例来源:origin: org.geotools/gt2-metadata

/**
 * Compares the specified entry with this one for equality.
 */
public boolean equals(final Map.Entry entry) {
  return Utilities.equals(getKey(),   entry.getKey()) &&
      Utilities.equals(getValue(), entry.getValue());
}

代码示例来源:origin: org.geotools/gt2-widgets-swing

/** Invoked when a new cell is selected. */
public void valueChanged(final ListSelectionEvent event) {
  if (!event.getValueIsAdjusting()) {
    final ImageTableModel samples = (ImageTableModel) table.getModel();
    final Color c=samples.getColorAt(table.getSelectedRow(), table.getSelectedColumn());
    if (!Utilities.equals(c, color)) {
      color = c;
      repaint();
    }
  }
}

代码示例来源:origin: org.geotools/gt2-api

/**
 * value object with equality based on name and namespace.
 */
public boolean equals(Object obj) {
  if (obj instanceof TypeName) {
    TypeName other = (TypeName) obj;
    return Utilities.equals(getURI(), other.getURI());
  }
  return false;
}

代码示例来源:origin: org.geotools/gt2-xml-xsd

/**
 * Equals override, equality is based soley on {@link #getNamespaceURI()}.
 */
public final boolean equals(Object obj) {
  if ( obj instanceof Configuration ) {
    Configuration other = (Configuration) obj;
    return Utilities.equals( getNamespaceURI(), other.getNamespaceURI() );
  }
  
  return false;
}

代码示例来源:origin: org.geotools/gt2-xml-core

/**
 * Equals override, equality is based soley on {@link #getNamespaceURI()}.
 */
public final boolean equals(Object obj) {
  if (obj instanceof Configuration) {
    Configuration other = (Configuration) obj;
    return Utilities.equals(getNamespaceURI(), other.getNamespaceURI());
  }
  return false;
}

代码示例来源:origin: org.geotools/gt2-coverage

/**
   * Compares this object with the specified entry for equality.
   */
  public boolean equals(final Object object) {
    return (object instanceof Ref) &&
        Utilities.equals(getCoverage(), ((Ref) object).getCoverage());
  }
}

代码示例来源:origin: org.geotools.xsd/gt-core

/**
 * Equals override, equality is based soley on {@link #getNamespaceURI()}.
 */
public final boolean equals(Object obj) {
  if (obj instanceof Configuration) {
    Configuration other = (Configuration) obj;
    return Utilities.equals(getNamespaceURI(), other.getNamespaceURI());
  }
  return false;
}

相关文章

微信公众号

最新文章

更多