Example usage for java.util Objects equals

List of usage examples for java.util Objects equals

Introduction

In this page you can find the example usage for java.util Objects equals.

Prototype

public static boolean equals(Object a, Object b) 

Source Link

Document

Returns true if the arguments are equal to each other and false otherwise.

Usage

From source file:com.okta.sdk.models.log.LogClient.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }/*from   w  w  w  .j a v a2 s .  c  o m*/
    if (obj == null || !(obj instanceof LogClient)) {
        return false;
    }
    final LogClient other = (LogClient) obj;
    return Objects.equals(this.userAgent, other.userAgent) && Objects.equals(this.zone, other.zone)
            && Objects.equals(this.device, other.device) && Objects.equals(this.id, other.id)
            && Objects.equals(this.ipAddress, other.ipAddress)
            && Objects.equals(this.geographicalContext, other.geographicalContext);
}

From source file:mobile.vo.group.GroupDetailVO.java

public static GroupDetailVO create(vo.GroupVO source) {
    GroupDetailVO vo = new GroupDetailVO();

    vo.id = source.getId();//w w w. j a v a2s.  c  om
    vo.groupName = source.getGroupName();
    vo.countMem = source.getCountMem();
    vo.createDate = new DateTime(source.getCreateDate()).toString("yyyy-MM-dd HH:mm:ss");
    vo.headUrl = source.getHeadUrl();
    vo.industryId = source.getIndustryId();
    vo.industryName = source.getIndustryName();
    vo.groupInfo = StringUtils.defaultIfEmpty(source.getGroupInfo(), "");

    vo.skillsTags = source.getTags();

    Type tp = Type.getByName(source.getType());
    if (null != tp) {
        vo.type = tp.toString();
    }

    if (tp == Type.NORMAL) {
        Expert ownerExpert = Expert.getExpertByUserId(source.getOwnerId());
        vo.owner = User.create(ownerExpert);
    }

    GroupPriv priv = GroupPriv.getByName(source.getGroupPriv());
    if (null != priv) {
        vo.groupPriv = priv.toString();
    }

    vo.maxMemberNum = source.getMaxMemberNum();

    // ??
    models.User user = models.User.getFromSession(Context.current().session());
    if (null != user) {
        Map<Long, Boolean> joinGroupMap = GroupMember.checkJoinGroup(user.getId(),
                Arrays.asList(source.getId()));
        vo.setIsJoin(joinGroupMap.get(source.getId()));
    }

    if (null != user && tp == Type.NORMAL) {
        vo.isOwner = Objects.equals(user.getId(), source.getOwnerId());
    }
    return vo;
}

From source file:net.bluemix.connectors.core.info.WatsonDocumentConversionServiceInfo.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }/*from  w ww  .  j  a  va  2s . co m*/
    if (obj == null || getClass() != obj.getClass()) {
        return false;
    }
    final WatsonDocumentConversionServiceInfo other = (WatsonDocumentConversionServiceInfo) obj;
    if (!Objects.equals(this.username, other.username)) {
        return false;
    }
    if (!Objects.equals(this.password, other.password)) {
        return false;
    }
    if (!Objects.equals(this.url, other.url)) {
        return false;
    }
    return Objects.equals(this.id, other.id);
}

From source file:net.bluemix.connectors.core.info.MessageHubServiceInfo.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }/*from   w  ww.  j  a v  a 2 s .  c  om*/
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final MessageHubServiceInfo other = (MessageHubServiceInfo) obj;
    if (!Objects.equals(this.id, other.id)) {
        return false;
    }
    if (!Objects.equals(this.username, other.username)) {
        return false;
    }
    if (!Objects.equals(this.password, other.password)) {
        return false;
    }
    return Objects.equals(this.brokers, other.brokers);
}

From source file:net.bluemix.connectors.core.info.WatsonLanguageTranslatorServiceInfo.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }//from www . j a va2 s  .c  om
    if (obj == null || getClass() != obj.getClass()) {
        return false;
    }
    final WatsonLanguageTranslatorServiceInfo other = (WatsonLanguageTranslatorServiceInfo) obj;
    if (!Objects.equals(this.id, other.id)) {
        return false;
    }
    if (!Objects.equals(this.username, other.username)) {
        return false;
    }
    if (!Objects.equals(this.password, other.password)) {
        return false;
    }
    if (!Objects.equals(this.url, other.url)) {
        return false;
    }
    return Objects.equals(this.id, other.id);
}

From source file:net.bluemix.connectors.core.info.WatsonPersonalityInsightsServiceInfo.java

@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }//from   w w w  .  j a v a  2s . co  m
    if (obj == null || getClass() != obj.getClass()) {
        return false;
    }
    final WatsonPersonalityInsightsServiceInfo other = (WatsonPersonalityInsightsServiceInfo) obj;
    if (!Objects.equals(this.username, other.username)) {
        return false;
    }
    if (!Objects.equals(this.password, other.password)) {
        return false;
    }
    if (!Objects.equals(this.url, other.url)) {
        return false;
    }
    return Objects.equals(this.id, other.id);
}

From source file:com.autodesk.client.model.StorageRelationshipsTarget.java

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }//from ww  w . j a  v a 2 s  . c o  m
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    StorageRelationshipsTarget storageRelationshipsTarget = (StorageRelationshipsTarget) o;
    return Objects.equals(this.links, storageRelationshipsTarget.links)
            && Objects.equals(this.data, storageRelationshipsTarget.data);
}

From source file:com.autodesk.client.model.PostObjectSigned.java

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }/*from  w ww  .j  a  v  a  2s.  c  om*/
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    PostObjectSigned postObjectSigned = (PostObjectSigned) o;
    return Objects.equals(this.signedUrl, postObjectSigned.signedUrl)
            && Objects.equals(this.expiration, postObjectSigned.expiration);
}

From source file:com.autodesk.client.model.JsonApiRelationshipsLinksExternalResource.java

@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }/*from www  .  ja v a 2 s  . c  o m*/
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    JsonApiRelationshipsLinksExternalResource jsonApiRelationshipsLinksExternalResource = (JsonApiRelationshipsLinksExternalResource) o;
    return Objects.equals(this.meta, jsonApiRelationshipsLinksExternalResource.meta)
            && Objects.equals(this.data, jsonApiRelationshipsLinksExternalResource.data);
}

From source file:com.testing26thjuly_.wmstudio.Table29.java

@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (!(o instanceof Table29))
        return false;
    final Table29 table29 = (Table29) o;
    return Objects.equals(getId(), table29.getId());
}