@Override public int indexOf(Object o) { int len = arr.length; for (int i = 0; i < len; i++) { E e = arr[i]; if (Objects.equals(e, o)) { return i; } } return -1; }
private ResContainer(String name, List<ResContainer> subFiles, Object data, DataType dataType) { this.name = Objects.requireNonNull(name); this.subFiles = Objects.requireNonNull(subFiles); this.data = Objects.requireNonNull(data); this.dataType = Objects.requireNonNull(dataType); }
@Override public int hashCode() { return Objects.hash(this.metadata, this.importClassName); } }
public boolean isNamespaceUnique(String appId, String cluster, String namespace) { Objects.requireNonNull(appId, "AppId must not be null"); Objects.requireNonNull(cluster, "Cluster must not be null"); Objects.requireNonNull(namespace, "Namespace must not be null"); return Objects.isNull( namespaceRepository.findByAppIdAndClusterNameAndNamespaceName(appId, cluster, namespace)); }
@Override public int hashCode() { if (hash != 0) return hash; final int prime = 31; int result = 1; result = prime * result + partition; result = prime * result + Objects.hashCode(topic); this.hash = result; return result; }
public boolean isAppNamespaceNameUnique(String appId, String namespaceName) { Objects.requireNonNull(appId, "AppId must not be null"); Objects.requireNonNull(namespaceName, "Namespace must not be null"); return Objects.isNull(appNamespaceRepository.findByAppIdAndName(appId, namespaceName)); }
@Override public int hashCode() { int result = Objects.hashCode(certificateChainCleaner); result = 31 * result + pins.hashCode(); return result; }
@Override public int lastIndexOf(Object o) { for (int i = arr.length - 1; i > 0; i--) { E e = arr[i]; if (Objects.equals(e, o)) { return i; } } return -1; }
public JadxWarn(String warn) { this.warn = Objects.requireNonNull(warn); }
@Override public int hashCode() { return Objects.hash(catchTypes, handleOffset /*, tryBlock*/); }
public boolean isClusterNameUnique(String appId, String clusterName) { Objects.requireNonNull(appId, "AppId must not be null"); Objects.requireNonNull(clusterName, "ClusterName must not be null"); return Objects.isNull(clusterRepository.findByAppIdAndName(appId, clusterName)); }
@Override public int hashCode() { int result = 17; result = 31 * result + url.hashCode(); result = 31 * result + dns.hashCode(); result = 31 * result + proxyAuthenticator.hashCode(); result = 31 * result + protocols.hashCode(); result = 31 * result + connectionSpecs.hashCode(); result = 31 * result + proxySelector.hashCode(); result = 31 * result + Objects.hashCode(proxy); result = 31 * result + Objects.hashCode(sslSocketFactory); result = 31 * result + Objects.hashCode(hostnameVerifier); result = 31 * result + Objects.hashCode(certificatePinner); return result; }
// These two have the same value new String("test").equals("test") // --> true // ... but they are not the same object new String("test") == "test" // --> false // ... neither are these new String("test") == new String("test") // --> false // ... but these are because literals are interned by // the compiler and thus refer to the same object "test" == "test" // --> true // ... but you should really just call Objects.equals() Objects.equals("test", new String("test")) // --> true Objects.equals(null, "test") // --> false
public ImmutableList(E[] arr) { this.arr = Objects.requireNonNull(arr); }
@Override public int hashCode() { return Objects.hash(userId); } }
public boolean isAppNamespaceNameUnique(String appId, String namespaceName) { Objects.requireNonNull(appId, "AppId must not be null"); Objects.requireNonNull(namespaceName, "Namespace must not be null"); return Objects.isNull(appNamespaceRepository.findByAppIdAndName(appId, namespaceName)); }
public Builder(Map<ConfigResource, Config> configs, boolean validateOnly) { super(ApiKeys.ALTER_CONFIGS); this.configs = Objects.requireNonNull(configs, "configs"); this.validateOnly = validateOnly; }
/** * @since 1.515 */ @Override public int hashCode() { return Objects.hash(upstreamCauses, upstreamBuild, upstreamUrl, upstreamProject); }