Class Selection
java.lang.Object
es.uam.eps.ir.relison.diffusion.selections.Selection
public class Selection
extends java.lang.Object
Selection of information pieces to propagate.
-
Field Summary
Fields Modifier and Type Field Description (package private) int
numProp
private java.util.List<PropagatedInformation>
ownSelection
Selection of own information pieces to propagate.private java.util.List<PropagatedInformation>
propagateSelection
Selection of received information pieces to propagateprivate java.util.List<PropagatedInformation>
repropagateSelection
Selection of already propagated pieces to propagate. -
Constructor Summary
Constructors Constructor Description Selection(java.util.List<PropagatedInformation> ownSelection, java.util.List<PropagatedInformation> propagateSelection)
Constructor.Selection(java.util.List<PropagatedInformation> ownSelection, java.util.List<PropagatedInformation> propagateSelection, java.util.List<PropagatedInformation> repropagateSelection)
Constructor. -
Method Summary
Modifier and Type Method Description java.util.stream.Stream<PropagatedInformation>
getAll()
Returns the concatenated information of all lists.java.util.stream.Stream<PropagatedInformation>
getOwnSelection()
Obtains the list of selected information pieces created by the userjava.util.stream.Stream<PropagatedInformation>
getPropagateSelection()
Obtains the list of selected information pieces received by the userjava.util.stream.Stream<PropagatedInformation>
getRepropagateSelection()
Obtains the list of selected information pieces to repropagate.int
numPropagated()
The total number of pieces of information to be propagated/repropagated.
-
Field Details
-
numProp
int numProp -
ownSelection
Selection of own information pieces to propagate. -
propagateSelection
Selection of received information pieces to propagate -
repropagateSelection
Selection of already propagated pieces to propagate.
-
-
Constructor Details
-
Selection
public Selection(java.util.List<PropagatedInformation> ownSelection, java.util.List<PropagatedInformation> propagateSelection)Constructor.- Parameters:
ownSelection
- selection of own information pieces to propagate.propagateSelection
- selection of received information pieces to propagate.
-
Selection
public Selection(java.util.List<PropagatedInformation> ownSelection, java.util.List<PropagatedInformation> propagateSelection, java.util.List<PropagatedInformation> repropagateSelection)Constructor.- Parameters:
ownSelection
- selection of own information pieces to propagate.propagateSelection
- selection of received information pieces to propagate.repropagateSelection
- selection of already propagated pieces to repropagate.
-
-
Method Details
-
getOwnSelection
Obtains the list of selected information pieces created by the user- Returns:
- the list of selected information pieces created by the user.
-
getPropagateSelection
Obtains the list of selected information pieces received by the user- Returns:
- the list of selected information pieces received by the user.
-
getRepropagateSelection
Obtains the list of selected information pieces to repropagate.- Returns:
- the list of selected information pieces to repropagate.
-
numPropagated
public int numPropagated()The total number of pieces of information to be propagated/repropagated.- Returns:
- the number of pieces of information to be propagated/repropagated
-
getAll
Returns the concatenated information of all lists.- Returns:
- an stream containing all the selected pieces to propagate/repropagate.
-