Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rgudwin committed Jul 11, 2023
1 parent c811632 commit 4b9b69a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ dependencies {
api 'org.antlr:antlr4-runtime:4.5.3' // Used in OwrlBaseListener
api 'com.github.masecla22:java-express:0.2.2'
implementation 'ch.qos.logback:logback-classic:1.3.6'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
//testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3'

}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/br/unicamp/cst/attention/CFM.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
* (i) the sum of the values​generated by the bottom-up feature maps and
* (ii) the sum of the values ​​generated by the top-down feature maps.
*
* If (i) > (ii), the winner of the attentional cycle is classified as bottom-up.
* If (ii) > (i), the winner of the attentional cycle is classified as top-down.
* If (i) (@code >} (ii), the winner of the attentional cycle is classified as bottom-up.
* If (ii) (@code >} (i), the winner of the attentional cycle is classified as top-down.
*
* @author leolellisr
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ public synchronized Long getTimestamp(int index) {
* @param memoryObserver the observer to be added
*/
@Override
public void addMemoryObserver(MemoryObserver memoryObserver) {
public synchronized void addMemoryObserver(MemoryObserver memoryObserver) {
for (Memory memory : memories) {
memory.addMemoryObserver(memoryObserver);
}
Expand All @@ -695,7 +695,7 @@ public void addMemoryObserver(MemoryObserver memoryObserver) {
* @param memoryObserver the observer to be removed
*/
@Override
public void removeMemoryObserver(MemoryObserver memoryObserver) {
public synchronized void removeMemoryObserver(MemoryObserver memoryObserver) {
for (Memory memory : memories) {
memory.removeMemoryObserver(memoryObserver);
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/br/unicamp/cst/core/entities/MemoryObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
package br.unicamp.cst.core.entities;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;

/**
* A Memory Object is a generic information holder, acting as a sign or an
Expand Down Expand Up @@ -270,9 +270,9 @@ public boolean equals(Object obj) {
* Add a memory observer to its list
* @param memoryObserver the MemoryObserve to be added
*/
public void addMemoryObserver(MemoryObserver memoryObserver) {
public synchronized void addMemoryObserver(MemoryObserver memoryObserver) {
if (this.memoryObservers == null) {
this.memoryObservers = new HashSet<MemoryObserver>();
this.memoryObservers = new CopyOnWriteArraySet<>();
}
this.memoryObservers.add(memoryObserver);
}
Expand All @@ -281,7 +281,7 @@ public void addMemoryObserver(MemoryObserver memoryObserver) {
* Remove a memory observer from its list
* @param memoryObserver the MemoryObserve to be removed
*/
public void removeMemoryObserver(MemoryObserver memoryObserver) {
public synchronized void removeMemoryObserver(MemoryObserver memoryObserver) {
if (this.memoryObservers != null) {
this.memoryObservers.remove(memoryObserver);
}
Expand Down

0 comments on commit 4b9b69a

Please sign in to comment.