de.rpgframework.genericrpg.CalculatedValue Maven / Gradle / Ivy
The newest version!
package de.rpgframework.genericrpg;
import java.util.ArrayList;
import java.util.stream.Collectors;
/**
* @author stefa
*
*/
@SuppressWarnings("serial")
public class CalculatedValue extends ArrayList> {
//-------------------------------------------------------------------
public CalculatedValue() {
}
//-------------------------------------------------------------------
public int getAsInt() {
return (int) stream().collect(Collectors.summarizingInt(pc -> (int)pc.value)).getSum();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy