本文整理了Java中java.util.Vector.equals()
方法的一些代码示例,展示了Vector.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vector.equals()
方法的具体详情如下:
包路径:java.util.Vector
类名称:Vector
方法名:equals
[英]Compares the specified object to this vector and returns if they are equal. The object must be a List which contains the same objects in the same order.
[中]将指定的对象与此向量进行比较,并返回它们是否相等。对象必须是以相同顺序包含相同对象的列表。
代码示例来源:origin: org.apache.ant/ant
/**
* @param rhs the object to check for equality.
* @see java.lang.Object#equals
* @return true if the key and values are the same.
*/
@Override
public boolean equals(Object rhs) {
if (rhs == null || rhs.getClass() != getClass()) {
return false;
}
if (rhs == this) {
return true;
}
Attribute rhsAttribute = (Attribute) rhs;
String lhsKey = getKey();
String rhsKey = rhsAttribute.getKey();
return (lhsKey != null || rhsKey == null)
&& (lhsKey == null || lhsKey.equals(rhsKey)) && values.equals(rhsAttribute.values);
}
代码示例来源:origin: protostuff/protostuff
return false;
else if (!vector.equals(other.vector))
return false;
return true;
代码示例来源:origin: org.codehaus.plexus/plexus-archiver
/**
* @see java.lang.Object#equals
*/
@Override
public boolean equals( Object rhs )
{
if ( super.equals( rhs ) )
{
return false;
}
if ( rhs == null || rhs.getClass() != getClass() )
{
return false;
}
if ( rhs == this )
{
return true;
}
Attribute rhsAttribute = (Attribute) rhs;
String lhsKey = getKey();
String rhsKey = rhsAttribute.getKey();
//noinspection SimplifiableIfStatement,ConstantConditions
if ( ( lhsKey == null && rhsKey != null ) || ( lhsKey != null && rhsKey == null ) || !lhsKey.equals(
rhsKey ) )
{
return false;
}
return rhsAttribute.values != null && values.equals( rhsAttribute.values );
}
代码示例来源:origin: stax/stax
public boolean equals(Object ob)
{
if (ob == this) return true;
if (!(ob instanceof DTDEnumeration)) return false;
DTDEnumeration other = (DTDEnumeration) ob;
return items.equals(other.items);
}
代码示例来源:origin: stax/stax
/** Returns true if this object is equal to another */
public boolean equals(Object ob)
{
if (this == ob) return true;
if (!(ob instanceof DTD)) return false;
DTD otherDTD = (DTD) ob;
return items.equals(otherDTD.items);
}
代码示例来源:origin: stax/stax
public boolean equals(Object ob)
{
if (ob == this) return true;
if (!(ob instanceof DTDNotationList)) return false;
DTDNotationList other = (DTDNotationList) ob;
return items.equals(other.items);
}
代码示例来源:origin: org.apache.isis.runtimes.dflt.objectstores/xml
@Override
public boolean equals(final Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof ReferenceVector) {
return ((ReferenceVector) obj).elements.equals(elements);
}
return false;
}
代码示例来源:origin: org.nakedobjects/xmlpersistence
@Override
public boolean equals(final Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof ReferenceVector) {
return ((ReferenceVector) obj).elements.equals(elements);
}
return false;
}
代码示例来源:origin: edu.illinois.cs.cogcomp/saul-examples
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ConllRawSentence that = (ConllRawSentence) o;
if (sentId != that.sentId) return false;
if (entityIndices != null ? !entityIndices.equals(that.entityIndices) : that.entityIndices != null)
return false;
if (relations != null ? !relations.equals(that.relations) : that.relations != null) return false;
if (sentTokens != null ? !sentTokens.equals(that.sentTokens) : that.sentTokens != null) return false;
return true;
}
代码示例来源:origin: stax/stax
public boolean equals(Object ob)
{
if (ob == this) return true;
if (!(ob instanceof DTDAttlist)) return false;
DTDAttlist other = (DTDAttlist) ob;
if ((name == null) && (other.name != null)) return false;
if ((name != null) && !name.equals(other.name)) return false;
return attributes.equals(other.attributes);
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* First wait until complete.
*/
public synchronized boolean equals(Object object) {
waitUntilComplete();
return super.equals(object);
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* @see java.util.Vector#equals(java.lang.Object)
*/
@Override
public boolean equals(Object o) {
return getDelegate().equals(o);
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* First wait until complete.
*/
public synchronized boolean equals(Object object) {
waitUntilComplete();
return super.equals(object);
}
代码示例来源:origin: toplink.essentials/toplink-essentials
/**
* First wait until complete.
*/
public synchronized boolean equals(Object object) {
waitUntilComplete();
return super.equals(object);
}
代码示例来源:origin: stax/stax
public boolean equals(Object ob)
{
if (ob == this) return true;
if (!(ob instanceof DTDContainer)) return false;
if (!super.equals(ob)) return false;
DTDContainer other = (DTDContainer) ob;
return items.equals(other.items);
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* First wait until complete.
*/
public synchronized boolean equals(Object object) {
waitUntilComplete();
return super.equals(object);
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* @see java.util.Vector#equals(java.lang.Object)
*/
public boolean equals(Object o) {
return getDelegate().equals(o);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
@Override
public synchronized boolean equals(Object paramObject) {
if (!_directAccess && isDelayLoad()) {
load();
}
return super.equals(paramObject);
}
代码示例来源:origin: org.apache.openejb.patch/openjpa
@Override
public synchronized boolean equals(Object paramObject) {
if (!_directAccess && isDelayLoad()) {
load();
}
return super.equals(paramObject);
}
代码示例来源:origin: octo-online/reactive-audit
@Test(expected = ReactiveAuditException.class)
public void equalsThis()
{
ReactiveAudit.off.commit();
Vector vector=new Vector();
TestTools.strict.commit();
vector.equals(null);
}
@Test(expected = ReactiveAuditException.class)
内容来源于网络,如有侵权,请联系作者删除!