Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajout limite taille liste_ventes et liste_achats envoyé par le serveur #14

Merged
merged 22 commits into from
Feb 26, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Marche.java
david540 authored Feb 25, 2017
commit b609aa5b4ca751f093752e03e74d38b4fff7cbc0
10 changes: 8 additions & 2 deletions 2017/SimBourse/src/core/Marche.java
Original file line number Diff line number Diff line change
@@ -112,13 +112,19 @@ public synchronized boolean nom_possible(String nom) {
return true;
}

public Set<Ordre> getListeAchats(Action a) {
public synchronized Set<Ordre> getListeAchats(Action a) {
return liste_achats.get(a);
}
public synchronized List<Ordre> getListeAchats(Action a, int longueurMaxListe) {
return (new LinkedList<Ordre>(liste_achats.get(a))).subList(0, longueurMaxListe);
}

public Set<Ordre> getListeVentes(Action a) {
public synchronized Set<Ordre> getListeVentes(Action a) {
return liste_ventes.get(a);
}
public synchronized List<Ordre> getListeVentes(Action a, int longueurMaxListe) {
return (new LinkedList<Ordre>(liste_ventes.get(a))).subList(0, longueurMaxListe);
}

/**
* @param a : le nom de l'action