public virtual bool IsCopy(Edu.Stanford.Nlp.Ling.IndexedWord otherWord) { int myInd = Get(typeof(CoreAnnotations.IndexAnnotation)); int otherInd = otherWord.Get(typeof(CoreAnnotations.IndexAnnotation)); if (!Objects.Equals(myInd, otherInd)) { return(false); } int mySentInd = Get(typeof(CoreAnnotations.SentenceIndexAnnotation)); int otherSentInd = otherWord.Get(typeof(CoreAnnotations.SentenceIndexAnnotation)); if (!Objects.Equals(mySentInd, otherSentInd)) { return(false); } string myDocID = GetString <CoreAnnotations.DocIDAnnotation>(); string otherDocID = otherWord.GetString <CoreAnnotations.DocIDAnnotation>(); if (!Objects.Equals(myDocID, otherDocID)) { return(false); } if (CopyCount() == 0 || otherWord.CopyCount() != 0) { return(false); } return(true); }
public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null) { return(false); } if (this.GetType() != obj.GetType()) { return(false); } LeastSquareResults other = (LeastSquareResults)obj; if (System.BitConverter.DoubleToInt64Bits(_chiSq) != Double.doubleToLongBits(other._chiSq)) { return(false); } if (!Objects.Equals(_covariance, other._covariance)) { return(false); } if (!Objects.Equals(_inverseJacobian, other._inverseJacobian)) { return(false); } return(Objects.Equals(_parameters, other._parameters)); }
/// <summary>Register an Annotator that can be created by the pool.</summary> /// <remarks> /// Register an Annotator that can be created by the pool. /// Note that factories are used here so that many possible annotators can /// be defined within the AnnotatorPool, but an Annotator is only created /// when one is actually needed. /// </remarks> /// <param name="name">The name to be associated with the Annotator.</param> /// <param name="props">The properties we are using to create the annotator</param> /// <param name="annotator"> /// A factory that creates an instance of the desired Annotator. /// This should be an instance of /// <see cref="Edu.Stanford.Nlp.Util.Lazy{E}.Cache{E}(Java.Util.Function.ISupplier{T})"/> /// , if we want /// the annotator pool to behave as a cache (i.e., evict old annotators /// when the GC requires it). /// </param> /// <returns>true if a new annotator was created; false if we reuse an existing one</returns> public virtual bool Register(string name, Properties props, Lazy <IAnnotator> annotator) { bool newAnnotator = false; string newSig = PropertiesUtils.GetSignature(name, props); lock (this.cachedAnnotators) { AnnotatorPool.CachedAnnotator oldAnnotator = this.cachedAnnotators[name]; if (oldAnnotator == null || !Objects.Equals(oldAnnotator.signature, newSig)) { // the new annotator uses different properties so we need to update! if (oldAnnotator != null) { // Try to get it from the global cache log.Debug("Replacing old annotator \"" + name + "\" with signature [" + oldAnnotator.signature + "] with new annotator with signature [" + newSig + "]"); } // Add the new annotator this.cachedAnnotators[name] = new AnnotatorPool.CachedAnnotator(newSig, annotator); // Unmount the old annotator Optional.OfNullable(oldAnnotator).FlatMap(null).IfPresent(null); // Register that we added an annotator newAnnotator = true; } } // nothing to do if an annotator with same name and signature already exists return(newAnnotator); }
public bool Equals(SaveFileGTA3 other) { if (other == null) { return(false); } return(SimpleVars.Equals(other.SimpleVars) && Scripts.Equals(other.Scripts) && PlayerPeds.Equals(other.PlayerPeds) && Garages.Equals(other.Garages) && Vehicles.Equals(other.Vehicles) && Objects.Equals(other.Objects) && Paths.Equals(other.Paths) && Cranes.Equals(other.Cranes) && Pickups.Equals(other.Pickups) && PhoneInfo.Equals(other.PhoneInfo) && RestartPoints.Equals(other.RestartPoints) && RadarBlips.Equals(other.RadarBlips) && Zones.Equals(other.Zones) && Gangs.Equals(other.Gangs) && CarGenerators.Equals(other.CarGenerators) && ParticleObjects.Equals(other.ParticleObjects) && AudioScriptObjects.Equals(other.AudioScriptObjects) && PlayerInfo.Equals(other.PlayerInfo) && Stats.Equals(other.Stats) && Streaming.Equals(other.Streaming) && PedTypeInfo.Equals(other.PedTypeInfo)); }
public override bool Equals(object another) { return(another is StoragePolicySummary.StorageTypeAllocation && Objects.Equals(specifiedStoragePolicy , ((StoragePolicySummary.StorageTypeAllocation)another).specifiedStoragePolicy) && Arrays.Equals(storageTypes, ((StoragePolicySummary.StorageTypeAllocation)another ).storageTypes)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void dump(String database, org.neo4j.io.layout.DatabaseLayout databaseLayout, java.nio.file.Path transactionalLogsDirectory, java.nio.file.Path archive) throws org.neo4j.commandline.admin.CommandFailed private void Dump(string database, DatabaseLayout databaseLayout, Path transactionalLogsDirectory, Path archive) { Path databasePath = databaseLayout.DatabaseDirectory().toPath(); try { File storeLockFile = databaseLayout.StoreLayout.storeLockFile(); System.Predicate <Path> pathPredicate = path => Objects.Equals(path.FileName.ToString(), storeLockFile.Name); _dumper.dump(databasePath, transactionalLogsDirectory, archive, CompressionFormat.ZSTD, pathPredicate); } catch (FileAlreadyExistsException e) { throw new CommandFailed("archive already exists: " + e.Message, e); } catch (NoSuchFileException e) { if (Paths.get(e.Message).toAbsolutePath().Equals(databasePath)) { throw new CommandFailed("database does not exist: " + database, e); } WrapIOException(e); } catch (IOException e) { WrapIOException(e); } }
public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null) { return(false); } if (this.GetType() != obj.GetType()) { return(false); } UncoupledParameterTransforms other = (UncoupledParameterTransforms)obj; if (!Arrays.Equals(_freeParameters, other._freeParameters)) { return(false); } if (!Objects.Equals(_startValues, other._startValues)) { return(false); } return(Arrays.Equals(_transforms, other._transforms)); }
public bool AreEqual <T>(T first, T second, Func <string> messageProducer) { bool areEqual = Objects.Equals(first, second); FailIfFalse(areEqual, messageProducer); return(areEqual); }
public bool AreNotEqual <T>(T first, T second, Func <string> messageProducer) where T : IEquatable <T> { bool areNotEqual = !Objects.Equals(first, second); FailIfFalse(areNotEqual, messageProducer); return(areNotEqual); }
public override bool Equals(object other) { RemovalNotification <K, V> notification = other as RemovalNotification <K, V>; if (!ReferenceEquals(notification, null)) { return(Objects.Equals(Key, notification.Key) && Objects.Equals(Value, notification.Value)); } return(false); }
public override void HandleStepDown(long term, string dbName) { LeaderInfo localLeaderInfo = Leader; bool wasLeaderForDbAndTerm = Objects.Equals(MyselfConflict, localLeaderInfo.MemberId()) && LocalDBName().Equals(dbName) && term == localLeaderInfo.Term(); if (wasLeaderForDbAndTerm) { Log.info("Step down event detected. This topology member, with MemberId %s, was leader in term %s, now moving " + "to follower.", MyselfConflict, localLeaderInfo.Term()); HandleStepDown0(localLeaderInfo.StepDown()); } }
//------------------------------------------------------------------------- public override bool Equals(object obj) { if (this == obj) { return true; } if (obj == null || this.GetType() != obj.GetType()) { return false; } TestObservableId that = (TestObservableId) obj; return Objects.Equals(id, that.id); }
//------------------------------------------------------------------------- public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj is TestingNamedId) { TestingNamedId other = (TestingNamedId)obj; return(Objects.Equals(name, other.name)); } return(false); }
//------------------------------------------------------------------------- /// <summary> /// Checks if this element equals another. /// <para> /// This compares the entire state of the element, including all children. /// /// </para> /// </summary> /// <param name="obj"> the other element, null returns false </param> /// <returns> true if equal </returns> public override bool Equals(object obj) { if (obj == this) { return(true); } if (obj is XmlElement) { XmlElement other = (XmlElement)obj; return(name.Equals(other.name) && Objects.Equals(content, other.content) && attributes.Equals(other.attributes) && children.Equals(other.children)); } return(false); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } TestSimpleId that = (TestSimpleId)o; return(Objects.Equals(id, that.id) && Objects.Equals(observableSource, that.observableSource)); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } InitialMagicMessage that = ( InitialMagicMessage )o; return(Objects.Equals(_magic, that._magic)); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } FieldSignature that = ( FieldSignature )o; return(_name.Equals(that._name) && _type.Equals(that._type) && Objects.Equals(this._defaultValue, that._defaultValue) && this._deprecated == that._deprecated); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } FilteringPolicy that = ( FilteringPolicy )o; return(Objects.Equals(_filter, that._filter)); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } FileHeader that = ( FileHeader )o; return(_requiredAlignment == that._requiredAlignment && Objects.Equals(_fileName, that._fileName)); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } BaseProtocolRequest that = ( BaseProtocolRequest )o; return(Objects.Equals(_protocolName, that._protocolName) && Objects.Equals(_versions, that._versions)); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } LockResult that = ( LockResult )o; return(Objects.Equals(_status, that._status) && Objects.Equals(_message, that._message)); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } RunMessage that = ( RunMessage )o; return(Objects.Equals(_statement, that._statement) && Objects.Equals(@params, that.@params) && Objects.Equals(_meta, that._meta)); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } GlobalSessionTrackerState that = ( GlobalSessionTrackerState )o; return(_logIndex == that._logIndex && Objects.Equals(_sessionTrackers, that._sessionTrackers)); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } InMemoryRaftLog that = ( InMemoryRaftLog )o; return(Objects.Equals(_appendIndex, that._appendIndex) && Objects.Equals(_commitIndex, that._commitIndex) && Objects.Equals(_term, that._term) && Objects.Equals(_raftLog, that._raftLog)); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } StoreLayout that = ( StoreLayout )o; return(Objects.Equals(_storeDirectory, that._storeDirectory)); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } ThresholdConfigValue that = ( ThresholdConfigValue )o; return(Value == that.Value && Objects.Equals(Type, that.Type)); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } LeaderInfo that = ( LeaderInfo )o; return(_term == that._term && _isSteppingDown == that._isSteppingDown && Objects.Equals(_memberId, that._memberId)); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } ReadReplicaTopology that = ( ReadReplicaTopology )o; return(Objects.Equals(_readReplicaMembers, that._readReplicaMembers)); }
public override bool Equals(object o) { if (this == o) { return(true); } if (o == null || this.GetType() != o.GetType()) { return(false); } BeginMessage that = ( BeginMessage )o; return(Objects.Equals(_meta, that._meta)); }
//------------------------------------------------------------------------- public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null || this.GetType() != obj.GetType()) { return(false); } TestingReferenceDataId that = (TestingReferenceDataId)obj; return(Objects.Equals(id, that.id)); }