Java Code Examples for java.util.Objects

The following are top voted examples for showing how to use java.util.Objects. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: connect-java-sdk   File: V1Discount.java   View source code 6 votes vote down vote up
@Override
public boolean equals(java.lang.Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  V1Discount v1Discount = (V1Discount) o;
  return Objects.equals(this.id, v1Discount.id) &&
      Objects.equals(this.name, v1Discount.name) &&
      Objects.equals(this.rate, v1Discount.rate) &&
      Objects.equals(this.amountMoney, v1Discount.amountMoney) &&
      Objects.equals(this.discountType, v1Discount.discountType) &&
      Objects.equals(this.pinRequired, v1Discount.pinRequired) &&
      Objects.equals(this.color, v1Discount.color);
}
 
Example 2
Project: Equella   File: VeryBasicSearch.java   View source code 6 votes vote down vote up
@Override
public boolean equals(Object obj)
{
	if( obj == null || !(obj instanceof VeryBasicSearch) )
	{
		return false;
	}
	else if( this == obj )
	{
		return true;
	}
	else
	{
		VeryBasicSearch rhs = (VeryBasicSearch) obj;
		return Objects.equals(query, rhs.query) && Objects.equals(queryTokens, rhs.queryTokens)
			&& Objects.equals(freeTextQuery, rhs.freeTextQuery);
	}
}
 
Example 3
Project: OpenJSharp   File: Streams.java   View source code 6 votes vote down vote up
@Override
public void forEachRemaining(IntConsumer consumer) {
    Objects.requireNonNull(consumer);

    int i = from;
    final int hUpTo = upTo;
    int hLast = last;
    from = upTo;
    last = 0;
    while (i < hUpTo) {
        consumer.accept(i++);
    }
    if (hLast > 0) {
        // Last element of closed range
        consumer.accept(i);
    }
}
 
Example 4
Project: chvote-protocol-poc   File: VoteConfirmationAuthorityAlgorithms.java   View source code 6 votes vote down vote up
/**
 * Algorithm 7.37: GetFinalization
 *
 * @param i            the voter index
 * @param upper_bold_p the point matrix, one point per voter per candidate
 * @param upper_b      the current ballot list
 * @return this authority's part of the finalization code
 */
public FinalizationCodePart getFinalization(Integer i, List<List<Point>> upper_bold_p, Collection<BallotEntry> upper_b) {
    BigInteger p_prime = publicParameters.getPrimeField().getP_prime();
    Preconditions.checkArgument(upper_bold_p.stream().flatMap(Collection::stream)
                    .allMatch(point -> BigInteger.ZERO.compareTo(point.x) <= 0 &&
                            point.x.compareTo(p_prime) < 0 &&
                            BigInteger.ZERO.compareTo(point.y) <= 0 &&
                            point.y.compareTo(p_prime) < 0),
            "All points' coordinates must be in Z_p_prime");
    Preconditions.checkElementIndex(i, upper_bold_p.size());

    Object[] bold_p_i = upper_bold_p.get(i).toArray();
    byte[] upper_f_i = ByteArrayUtils.truncate(hash.recHash_L(bold_p_i), publicParameters.getUpper_l_f());

    BallotEntry ballotEntry = upper_b.stream().filter(b -> Objects.equals(b.getI(), i)).findFirst().orElseThrow(
            () -> new BallotNotFoundRuntimeException(String.format("Couldn't find any ballot for voter %d", i))
    );

    return new FinalizationCodePart(upper_f_i, ballotEntry.getBold_r());
}
 
Example 5
Project: OpenJSharp   File: ZonedDateTime.java   View source code 6 votes vote down vote up
/**
 * Obtains an instance of {@code ZonedDateTime} strictly validating the
 * combination of local date-time, offset and zone ID.
 * <p>
 * This creates a zoned date-time ensuring that the offset is valid for the
 * local date-time according to the rules of the specified zone.
 * If the offset is invalid, an exception is thrown.
 *
 * @param localDateTime  the local date-time, not null
 * @param offset  the zone offset, not null
 * @param zone  the time-zone, not null
 * @return the zoned date-time, not null
 */
public static ZonedDateTime ofStrict(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone) {
    Objects.requireNonNull(localDateTime, "localDateTime");
    Objects.requireNonNull(offset, "offset");
    Objects.requireNonNull(zone, "zone");
    ZoneRules rules = zone.getRules();
    if (rules.isValidOffset(localDateTime, offset) == false) {
        ZoneOffsetTransition trans = rules.getTransition(localDateTime);
        if (trans != null && trans.isGap()) {
            // error message says daylight savings for simplicity
            // even though there are other kinds of gaps
            throw new DateTimeException("LocalDateTime '" + localDateTime +
                    "' does not exist in zone '" + zone +
                    "' due to a gap in the local time-line, typically caused by daylight savings");
        }
        throw new DateTimeException("ZoneOffset '" + offset + "' is not valid for LocalDateTime '" +
                localDateTime + "' in zone '" + zone + "'");
    }
    return new ZonedDateTime(localDateTime, offset, zone);
}
 
Example 6
Project: swaggy-jenkins   File: HudsonMasterComputermonitorData.java   View source code 6 votes vote down vote up
@Override
public boolean equals(java.lang.Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  HudsonMasterComputermonitorData hudsonMasterComputermonitorData = (HudsonMasterComputermonitorData) o;
  return Objects.equals(this.hudsonNodeMonitorsSwapSpaceMonitor, hudsonMasterComputermonitorData.hudsonNodeMonitorsSwapSpaceMonitor) &&
      Objects.equals(this.hudsonNodeMonitorsTemporarySpaceMonitor, hudsonMasterComputermonitorData.hudsonNodeMonitorsTemporarySpaceMonitor) &&
      Objects.equals(this.hudsonNodeMonitorsDiskSpaceMonitor, hudsonMasterComputermonitorData.hudsonNodeMonitorsDiskSpaceMonitor) &&
      Objects.equals(this.hudsonNodeMonitorsArchitectureMonitor, hudsonMasterComputermonitorData.hudsonNodeMonitorsArchitectureMonitor) &&
      Objects.equals(this.hudsonNodeMonitorsResponseTimeMonitor, hudsonMasterComputermonitorData.hudsonNodeMonitorsResponseTimeMonitor) &&
      Objects.equals(this.hudsonNodeMonitorsClockMonitor, hudsonMasterComputermonitorData.hudsonNodeMonitorsClockMonitor) &&
      Objects.equals(this.propertyClass, hudsonMasterComputermonitorData.propertyClass);
}
 
Example 7
Project: mbed-cloud-sdk-java   File: CampaignDeviceMetadata.java   View source code 6 votes vote down vote up
@Override
public boolean equals(java.lang.Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  CampaignDeviceMetadata campaignDeviceMetadata = (CampaignDeviceMetadata) o;
  return Objects.equals(this.description, campaignDeviceMetadata.description) &&
      Objects.equals(this.campaign, campaignDeviceMetadata.campaign) &&
      Objects.equals(this.createdAt, campaignDeviceMetadata.createdAt) &&
      Objects.equals(this.object, campaignDeviceMetadata.object) &&
      Objects.equals(this.updatedAt, campaignDeviceMetadata.updatedAt) &&
      Objects.equals(this.mechanism, campaignDeviceMetadata.mechanism) &&
      Objects.equals(this.name, campaignDeviceMetadata.name) &&
      Objects.equals(this.etag, campaignDeviceMetadata.etag) &&
      Objects.equals(this.mechanismUrl, campaignDeviceMetadata.mechanismUrl) &&
      Objects.equals(this.deploymentState, campaignDeviceMetadata.deploymentState) &&
      Objects.equals(this.id, campaignDeviceMetadata.id) &&
      Objects.equals(this.deviceId, campaignDeviceMetadata.deviceId);
}
 
Example 8
Project: ch-inofix-contact-manager   File: ExportImportBackgroundTaskDisplay.java   View source code 6 votes vote down vote up
protected String getStatusMessageKey() {
    if (Validator.isNotNull(_messageKey)) {
        return _messageKey;
    }

    _messageKey = StringPool.BLANK;

    if (hasRemoteMessage()) {
        _messageKey = "please-wait-as-the-publication-processes-on-the-remote-site";
    } else if (hasStagedModelMessage()) {
        _messageKey = "exporting";

        if (Objects.equals(_cmd, Constants.IMPORT)) {
            _messageKey = "importing";
        } else if (Objects.equals(_cmd, Constants.PUBLISH_TO_LIVE)
                || Objects.equals(_cmd, Constants.PUBLISH_TO_REMOTE)) {

            _messageKey = "publishing";
        }
    }

    return _messageKey;
}
 
Example 9
Project: verify-hub   File: EidasCycle0And1MatchRequestSentState.java   View source code 6 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }

    if (o == null || getClass() != o.getClass()) {
        return false;
    }

    EidasCycle0And1MatchRequestSentState that = (EidasCycle0And1MatchRequestSentState) o;

    return Objects.equals(encryptedIdentityAssertion, that.encryptedIdentityAssertion) &&
        Objects.equals(persistentId, that.persistentId) &&
        getTransactionSupportsEidas() == that.getTransactionSupportsEidas() &&
        Objects.equals(getRequestId(), that.getRequestId()) &&
        Objects.equals(getRequestIssuerEntityId(), that.getRequestIssuerEntityId()) &&
        Objects.equals(getSessionExpiryTimestamp(), that.getSessionExpiryTimestamp()) &&
        Objects.equals(getAssertionConsumerServiceUri(), that.getAssertionConsumerServiceUri()) &&
        Objects.equals(getSessionId(), that.getSessionId()) &&
        Objects.equals(getIdentityProviderEntityId(), that.getIdentityProviderEntityId()) &&
        Objects.equals(getRelayState(), that.getRelayState()) &&
        Objects.equals(getRequestSentTime(), that.getRequestSentTime()) &&
        getIdpLevelOfAssurance() == that.getIdpLevelOfAssurance() &&
        Objects.equals(getMatchingServiceAdapterEntityId(), that.getMatchingServiceAdapterEntityId());
}
 
Example 10
Project: connect-java-sdk   File: SearchCatalogObjectsRequest.java   View source code 6 votes vote down vote up
@Override
public boolean equals(java.lang.Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  SearchCatalogObjectsRequest searchCatalogObjectsRequest = (SearchCatalogObjectsRequest) o;
  return Objects.equals(this.cursor, searchCatalogObjectsRequest.cursor) &&
      Objects.equals(this.objectTypes, searchCatalogObjectsRequest.objectTypes) &&
      Objects.equals(this.includeDeletedObjects, searchCatalogObjectsRequest.includeDeletedObjects) &&
      Objects.equals(this.includeRelatedObjects, searchCatalogObjectsRequest.includeRelatedObjects) &&
      Objects.equals(this.beginTime, searchCatalogObjectsRequest.beginTime) &&
      Objects.equals(this.query, searchCatalogObjectsRequest.query) &&
      Objects.equals(this.limit, searchCatalogObjectsRequest.limit);
}
 
Example 11
Project: rainbow   File: CreateTable.java   View source code 6 votes vote down vote up
@Override
public boolean equals(Object obj)
{
    if (this == obj) {
        return true;
    }
    if ((obj == null) || (getClass() != obj.getClass())) {
        return false;
    }
    CreateTable o = (CreateTable) obj;
    return Objects.equals(name, o.name) &&
            Objects.equals(elements, o.elements) &&
            Objects.equals(notExists, o.notExists) &&
            Objects.equals(properties, o.properties) &&
            Objects.equals(comment, o.comment);
}
 
Example 12
Project: tinkergraph-gremlin   File: TinkerHelper.java   View source code 6 votes vote down vote up
public static Iterator<TinkerEdge> getEdges(final TinkerVertex vertex, final Direction direction, final String... edgeLabels) {
    final List<Edge> edges = new ArrayList<>();
    if (direction.equals(Direction.OUT) || direction.equals(Direction.BOTH)) {
        if (vertex.outEdges != null) {
            if (edgeLabels.length == 0)
                vertex.outEdges.values().forEach(edges::addAll);
            else if (edgeLabels.length == 1)
                edges.addAll(vertex.outEdges.getOrDefault(edgeLabels[0], Collections.emptySet()));
            else
                Stream.of(edgeLabels).map(vertex.outEdges::get).filter(Objects::nonNull).forEach(edges::addAll);
        }
    }
    if (direction.equals(Direction.IN) || direction.equals(Direction.BOTH)) {
        if (vertex.inEdges != null) {
            if (edgeLabels.length == 0)
                vertex.inEdges.values().forEach(edges::addAll);
            else if (edgeLabels.length == 1)
                edges.addAll(vertex.inEdges.getOrDefault(edgeLabels[0], Collections.emptySet()));
            else
                Stream.of(edgeLabels).map(vertex.inEdges::get).filter(Objects::nonNull).forEach(edges::addAll);
        }
    }
    return (Iterator) edges.iterator();
}
 
Example 13
Project: L2J-Global   File: ExAcquireSkillInfo.java   View source code 5 votes vote down vote up
/**
 * Special constructor for Alternate Skill Learning system.<br>
 * Sets a custom amount of SP.
 * @param player
 * @param skillLearn the skill learn.
 * @param sp the custom SP amount.
 */
public ExAcquireSkillInfo(L2PcInstance player, L2SkillLearn skillLearn, int sp)
{
	_id = skillLearn.getSkillId();
	_level = skillLearn.getSkillLevel();
	_dualClassLevel = skillLearn.getDualClassLevel();
	_spCost = sp;
	_minLevel = skillLearn.getGetLevel();
	_itemReq = skillLearn.getRequiredItems();
	_skillRem = skillLearn.getRemoveSkills().stream().map(player::getKnownSkill).filter(Objects::nonNull).collect(Collectors.toList());
}
 
Example 14
Project: iextrading4j-hist   File: IEXOperationalHaltStatusMessage.java   View source code 5 votes vote down vote up
@Override
public boolean equals(final Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    final IEXOperationalHaltStatusMessage that = (IEXOperationalHaltStatusMessage) o;
    return timestamp == that.timestamp &&
            operationalHaltStatus == that.operationalHaltStatus &&
            Objects.equals(symbol, that.symbol);
}
 
Example 15
Project: IPPR2016   File: BasicOutboundConfigurationBuilder.java   View source code 5 votes vote down vote up
@Override
public BasicOutboundConfiguration build() {
  Objects.requireNonNull(name);
  Objects.requireNonNull(messageProtocol);
  Objects.requireNonNull(composerClass);
  Preconditions.checkArgument(!composer.isEmpty());
  Objects.requireNonNull(sendPlugin);

  return new BasicOutboundConfigurationImpl(name, messageProtocol, composerClass, sendPlugin,
      composer, configuration);
}
 
Example 16
Project: arez   File: ComputedValueTest.java   View source code 5 votes vote down vote up
@Test
public void compute_whereLastStateProducedAnError()
  throws Exception
{
  final ArezContext context = new ArezContext();
  final String name = ValueUtil.randomString();
  final AtomicReference<String> value = new AtomicReference<>();
  final String value2 = ValueUtil.randomString();
  final SafeFunction<String> function = value::get;
  final EqualityComparator<String> comparator = Objects::equals;
  final ComputedValue<String> computedValue = new ComputedValue<>( context, null, name, function, comparator );

  setCurrentTransaction( computedValue.getObserver() );

  final Observer observer = newReadOnlyObserver( context );
  observer.setState( ObserverState.POSSIBLY_STALE );
  computedValue.getObserver().getDerivedValue().addObserver( observer );
  observer.getDependencies().add( computedValue.getObservable() );

  computedValue.getObservable().setLeastStaleObserverState( ObserverState.POSSIBLY_STALE );

  computedValue.setValue( null );
  computedValue.setError( new IllegalStateException() );

  value.set( value2 );

  computedValue.compute();

  assertEquals( computedValue.getValue(), value2 );
  assertEquals( computedValue.getError(), null );
  assertEquals( observer.getState(), ObserverState.STALE );
}
 
Example 17
Project: flightmanager   File: FlightTemplate.java   View source code 5 votes vote down vote up
@Override
public int hashCode() {
    int hash = 5;
    hash = 29 * hash + (int) (this.id ^ (this.id >>> 32));
    hash = 29 * hash + Objects.hashCode(this.flightState);
    hash = 29 * hash + Objects.hashCode(this.departureAirport);
    hash = 29 * hash + Objects.hashCode(this.arrivalAirport);
    hash = 29 * hash + Objects.hashCode(this.companyId);
    hash = 29 * hash + Objects.hashCode(this.isActive);
    return hash;
}
 
Example 18
Project: drift   File: TestingMethodInvocationStatsFactory.java   View source code 5 votes vote down vote up
@Override
public boolean equals(Object o)
{
    if (this == o) {
        return true;
    }
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    Key key = (Key) o;
    return Objects.equals(serviceName, key.serviceName) &&
            Objects.equals(qualifier, key.qualifier) &&
            Objects.equals(methodName, key.methodName);
}
 
Example 19
Project: open-kilda   File: FlowStatusRequest.java   View source code 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public boolean equals(Object object) {
    if (this == object) {
        return true;
    }
    if (object == null || getClass() != object.getClass()) {
        return false;
    }

    FlowStatusRequest that = (FlowStatusRequest) object;
    return Objects.equals(getPayload(), that.getPayload());
}
 
Example 20
Project: rainbow   File: CurrentTime.java   View source code 5 votes vote down vote up
@Override
public boolean equals(Object o)
{
    if (this == o) {
        return true;
    }
    if ((o == null) || (getClass() != o.getClass())) {
        return false;
    }
    CurrentTime that = (CurrentTime) o;
    return (type == that.type) &&
            Objects.equals(precision, that.precision);
}
 
Example 21
Project: happylifeplat-transaction   File: NettyMessageServiceImpl.java   View source code 5 votes vote down vote up
/**
 * 通知tm 回滚整个事务组
 *
 * @param txGroupId 事务组id
 * @return true 成功 false 失败
 */
@Override
public Boolean rollBackTxTransaction(String txGroupId) {
    HeartBeat heartBeat = new HeartBeat();
    heartBeat.setAction(NettyMessageActionEnum.ROLLBACK.getCode());
    TxTransactionGroup txTransactionGroup = new TxTransactionGroup();
    txTransactionGroup.setStatus(TransactionStatusEnum.ROLLBACK.getCode());
    txTransactionGroup.setId(txGroupId);
    heartBeat.setTxTransactionGroup(txTransactionGroup);
    final Object object = nettyClientMessageHandler.sendTxManagerMessage(heartBeat);
    if (Objects.nonNull(object)) {
        return (Boolean) object;
    }
    return false;
}
 
Example 22
Project: act-platform   File: FactCreateCommentDelegate.java   View source code 5 votes vote down vote up
private void verifyReplyToCommentExists(FactEntity fact, CreateFactCommentRequest request) throws InvalidArgumentException {
  if (request.getReplyTo() == null) return;

  boolean exists = TiRequestContext.get().getFactManager()
          .fetchFactComments(fact.getId())
          .stream()
          .anyMatch(comment -> Objects.equals(comment.getId(), request.getReplyTo()));

  if (!exists) {
    throw new InvalidArgumentException()
            .addValidationError("Comment does not exist.", "comment.no.exists", "replyTo", request.getReplyTo().toString());
  }
}
 
Example 23
Project: swaggy-jenkins   File: ExtensionClassImpllinks.java   View source code 5 votes vote down vote up
@Override
public boolean equals(java.lang.Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  ExtensionClassImpllinks extensionClassImpllinks = (ExtensionClassImpllinks) o;
  return Objects.equals(this.self, extensionClassImpllinks.self) &&
      Objects.equals(this.propertyClass, extensionClassImpllinks.propertyClass);
}
 
Example 24
Project: openjdk-jdk10   File: ServiceCredsCombination.java   View source code 5 votes vote down vote up
/**
 * Checks the correct bound
 * @param a get a creds for this principal, null for default one
 * @param b expected name, null for still unbound, "NOCRED" for no creds
 * @param objs princs, keys and keytabs in the subject
 */
private static void check(final String a, String b, Object... objs)
        throws Exception {
    Subject subj = new Subject();
    for (Object obj: objs) {
        if (obj instanceof KerberosPrincipal) {
            subj.getPrincipals().add((KerberosPrincipal)obj);
        } else if (obj instanceof KerberosKey || obj instanceof KeyTab) {
            subj.getPrivateCredentials().add(obj);
        }
    }
    final GSSManager man = GSSManager.getInstance();
    try {
        String result = Subject.doAs(
                subj, new PrivilegedExceptionAction<String>() {
            @Override
            public String run() throws GSSException {
                GSSCredential cred = man.createCredential(
                        a == null ? null : man.createName(r(a), null),
                        GSSCredential.INDEFINITE_LIFETIME,
                        GSSUtil.GSS_KRB5_MECH_OID,
                        GSSCredential.ACCEPT_ONLY);
                GSSName name = cred.getName();
                return name == null ? null : name.toString();
            }
        });
        if (!Objects.equals(result, r(b))) {
            throw new Exception("Check failed: getInstance(" + a
                    + ") has name " + result + ", not " + b);
        }
    } catch (PrivilegedActionException e) {
        if (!"NOCRED".equals(b)) {
            throw new Exception("Check failed: getInstance(" + a
                    + ") is null " + ", but not one with name " + b);
        }
    }
}
 
Example 25
Project: ServerBrowser   File: ArrayUtility.java   View source code 5 votes vote down vote up
/**
 * Checks if the array contains the given item.
 *
 * @param array
 *            the array to search in for
 * @param searchFor
 *            the item to search for
 * @return true if the array contains the item, otherwise false
 */
public static <T> boolean contains(final T[] array, final T searchFor) {
	if (Objects.isNull(array) || array.length == 0) {
		return false;
	}

	for (final T object : array) {
		if (object.equals(searchFor)) {
			return true;
		}
	}
	return false;
}
 
Example 26
Project: jdk8u-jdk   File: StackTraceElement.java   View source code 5 votes vote down vote up
/**
 * Returns a hash code value for this stack trace element.
 */
public int hashCode() {
    int result = 31*declaringClass.hashCode() + methodName.hashCode();
    result = 31*result + Objects.hashCode(fileName);
    result = 31*result + lineNumber;
    return result;
}
 
Example 27
Project: incubator-servicecomb-saga   File: User.java   View source code 5 votes vote down vote up
@Override
public boolean equals(Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  User user = (User) o;
  return id == user.id &&
      Objects.equals(username, user.username) &&
      Objects.equals(email, user.email);
}
 
Example 28
Project: powsybl-core   File: LoadZipModel.java   View source code 5 votes vote down vote up
public LoadZipModel(Load load, float a1, float a2, float a3, float a4, float a5, float a6, float v0) {
    this.load = Objects.requireNonNull(load);
    this.a1 = a1;
    this.a2 = a2;
    this.a3 = a3;
    this.a4 = a4;
    this.a5 = a5;
    this.a6 = a6;
    this.v0 = v0;
}
 
Example 29
Project: teemo   File: AbstractWebviewSwitcher.java   View source code 5 votes vote down vote up
/**
 * 切换context或window,若目标与当前相同则无动作
 * 
 * @param name
 */
protected void safeContextOrWindow(String name) {
	name = Objects.requireNonNull(name, "Context name must not be null");
	if (name.equals(mSwitcher.currentContextOrWindow())) {
		return;
	}

	if (mSwitcher.useWindow()) {
		switchToWebview();
		mSwitcher.window(name);
	} else {
		mSwitcher.context(name);
	}
}
 
Example 30
Project: swaggy-jenkins   File: ListView.java   View source code 5 votes vote down vote up
@Override
public boolean equals(java.lang.Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  ListView listView = (ListView) o;
  return Objects.equals(propertyClass, listView.propertyClass) &&
      Objects.equals(description, listView.description) &&
      Objects.equals(jobs, listView.jobs) &&
      Objects.equals(name, listView.name) &&
      Objects.equals(url, listView.url);
}
 
Example 31
Project: swaggy-jenkins   File: DefaultCrumbIssuer.java   View source code 5 votes vote down vote up
@Override
public boolean equals(Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  DefaultCrumbIssuer defaultCrumbIssuer = (DefaultCrumbIssuer) o;
  return Objects.equals(propertyClass, defaultCrumbIssuer.propertyClass) &&
      Objects.equals(crumb, defaultCrumbIssuer.crumb) &&
      Objects.equals(crumbRequestField, defaultCrumbIssuer.crumbRequestField);
}
 
Example 32
Project: calcite-avatica   File: Meta.java   View source code 5 votes vote down vote up
@Override public boolean equals(Object o) {
  return o == this
      || o instanceof CursorFactory
      && Objects.equals(clazz, ((CursorFactory) o).clazz)
      && Objects.equals(fieldNames, ((CursorFactory) o).fieldNames)
      && Objects.equals(fields, ((CursorFactory) o).fields)
      && style == ((CursorFactory) o).style;
}
 
Example 33
Project: connect-java-sdk   File: V1CreateRefundRequest.java   View source code 5 votes vote down vote up
@Override
public boolean equals(java.lang.Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  V1CreateRefundRequest v1CreateRefundRequest = (V1CreateRefundRequest) o;
  return Objects.equals(this.paymentId, v1CreateRefundRequest.paymentId) &&
      Objects.equals(this.type, v1CreateRefundRequest.type) &&
      Objects.equals(this.reason, v1CreateRefundRequest.reason) &&
      Objects.equals(this.refundedMoney, v1CreateRefundRequest.refundedMoney) &&
      Objects.equals(this.requestIdempotenceKey, v1CreateRefundRequest.requestIdempotenceKey);
}
 
Example 34
Project: rainbow   File: Intersect.java   View source code 5 votes vote down vote up
@Override
public boolean equals(Object obj)
{
    if (this == obj) {
        return true;
    }
    if ((obj == null) || (getClass() != obj.getClass())) {
        return false;
    }
    Intersect o = (Intersect) obj;
    return Objects.equals(relations, o.relations) &&
            Objects.equals(isDistinct(), o.isDistinct());
}
 
Example 35
Project: androidtv-sample   File: Program.java   View source code 5 votes vote down vote up
@Override
public int hashCode() {
    return Objects.hash(mChannelId, mStartTimeUtcMillis, mEndTimeUtcMillis,
            mTitle, mEpisodeTitle, mDescription, mLongDescription, mVideoWidth, mVideoHeight,
            mPosterArtUri, mThumbnailUri, mContentRatings, mCanonicalGenres, mSeasonNumber,
            mEpisodeNumber);
}
 
Example 36
Project: sample-SpringBoot-payments-app   File: CreateAccountPayload1.java   View source code 5 votes vote down vote up
@Override
public boolean equals(java.lang.Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  CreateAccountPayload1 createAccountPayload1 = (CreateAccountPayload1) o;
  return Objects.equals(this.name, createAccountPayload1.name);
}
 
Example 37
Project: luna   File: AuxFunctions.java   View source code 5 votes vote down vote up
@Override
public boolean equals(Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  Bind that = (Bind) o;
  return Objects.equals(fn, that.fn) && Arrays.equals(curriedArgs, that.curriedArgs);
}
 
Example 38
Project: redis-cluster-watchdog   File: RedisStorageEngine.java   View source code 5 votes vote down vote up
public RestoreReplicator(InputStream in, Configuration configuration) {
    Objects.requireNonNull(in);
    Objects.requireNonNull(configuration);
    this.configuration = configuration;
    this.inputStream = new RedisInputStream(in, this.configuration.getBufferSize());
    this.inputStream.setRawByteListeners(this.rawByteListeners);
    if (configuration.isUseDefaultExceptionListener())
        addExceptionListener(new DefaultExceptionListener());
}
 
Example 39
Project: Telejam   File: StickerMessage.java   View source code 5 votes vote down vote up
public StickerMessage(long id,
                      User sender,
                      long date,
                      Chat chat,
                      Message replyToMessage,
                      Long editDate,
                      String authorSignature,
                      Sticker sticker) {
  super(id, sender, date, chat, replyToMessage, editDate, authorSignature);
  this.sticker = Objects.requireNonNull(sticker);
}
 
Example 40
Project: vertx-aws-lambda   File: CaseSensitiveMultiMapImpl.java   View source code 5 votes vote down vote up
@Override
public String setValue(String value) {
    Objects.requireNonNull(value, "value");
    String oldValue = this.value;
    this.value = value;
    return oldValue;
}