Package es.urjc.etsii.grafo.config
Class BlockConfig
java.lang.Object
es.urjc.etsii.grafo.config.BlockConfig
@Configuration
@ConfigurationProperties(prefix="advanced.block")
public class BlockConfig
extends Object
Block Java API methods configuration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn true if method Collections.shuffle(LIST) should be blocked.booleanReturn true if method Math.random() should be blocked.voidsetBlockCollectionsShuffle(boolean blockCollectionsShuffle) NOOP after method has been blocked.voidsetBlockMathRandom(boolean blockMathRandom) NOOP after method has been blocked.
-
Constructor Details
-
BlockConfig
public BlockConfig()
-
-
Method Details
-
isBlockCollectionsShuffle
public boolean isBlockCollectionsShuffle()Return true if method Collections.shuffle(LIST) should be blocked. Use CollectionUtil.shuffle() instead.- Returns:
- true if method should be blocked, false otherwise
-
setBlockCollectionsShuffle
public void setBlockCollectionsShuffle(boolean blockCollectionsShuffle) NOOP after method has been blocked. Only used as a setter when deserializing the configuration file.- Parameters:
blockCollectionsShuffle- true if method should be blocked, false otherwise
-
isBlockMathRandom
public boolean isBlockMathRandom()Return true if method Math.random() should be blocked. Use RandomManager instead.- Returns:
- true if method should be blocked, false otherwise
-
setBlockMathRandom
public void setBlockMathRandom(boolean blockMathRandom) NOOP after method has been blocked. Only used as a setter when deserializing the configuration file.- Parameters:
blockMathRandom- true if method should be blocked, false otherwise
-