public void onStoichiometryUpdate(T entity, Stoichiometry oldStoichiometry) { if (oldStoichiometry == null){ entityChangeLogger.log(Level.INFO, "The stoichiometry has been initialised for the entity " + entity.toString()); } else if (entity.getStoichiometry() == null){ entityChangeLogger.log(Level.INFO, "The stoichiometry has been reset for the entity " + entity.toString()); } else { entityChangeLogger.log(Level.INFO, "The stoichiometry " + oldStoichiometry + " has been updated with " + entity.getStoichiometry() + " in the entity " + entity.toString()); } }
Stoichiometry stc1 = participant1.getStoichiometry(); Stoichiometry stc2 = participant2.getStoichiometry();
Stoichiometry stc1 = participant1.getStoichiometry(); Stoichiometry stc2 = participant2.getStoichiometry();
Stoichiometry stc1 = participant1.getStoichiometry(); Stoichiometry stc2 = participant2.getStoichiometry();
/** * * @param participant * @return the hashcode consistent with the equals method for this comparator */ public static int hashCode(Entity participant){ if (unambiguousParticipantComparator == null){ unambiguousParticipantComparator = new UnambiguousEntityBaseComparator(); } if (participant == null){ return 0; } int hashcode = 31; hashcode = 31*hashcode + UnambiguousInteractorBaseComparator.hashCode(participant.getInteractor()); hashcode = 31*hashcode + StoichiometryComparator.hashCode(participant.getStoichiometry()); return hashcode; } }
/** * * @param participant * @return the hashcode consistent with the equals method for this comparator */ public static int hashCode(Entity participant){ if (unambiguousExactParticipantComparator == null){ unambiguousExactParticipantComparator = new UnambiguousExactEntityBaseComparator(); } if (participant == null){ return 0; } int hashcode = 31; hashcode = 31*hashcode + UnambiguousExactInteractorBaseComparator.hashCode(participant.getInteractor()); hashcode = 31*hashcode + StoichiometryComparator.hashCode(participant.getStoichiometry()); return hashcode; } }
public static void copyAndOverrideBasicEntityProperties(Entity source, Entity target, boolean createNewFeature){ if (source != null && target != null){ target.setStoichiometry(source.getStoichiometry());