Class RankingSemanticsExample


  • public class RankingSemanticsExample
    extends java.lang.Object
    Example code for ranking semantics.
    Author:
    Anna Gessler
    • Method Summary

      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      private static double round​(double value, int n)
      Rounds a double value to n decimals.
      private static ArgumentRanking roundRanking​(NumericalArgumentRanking ranking, int n)
      Rounds values in the given numerical argument ranking to n decimals.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RankingSemanticsExample

        public RankingSemanticsExample()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
      • round

        private static double round​(double value,
                                    int n)
        Rounds a double value to n decimals.
        Parameters:
        value - a double value
        n - number of decimals
        Returns:
        value rounded to n decimals
      • roundRanking

        private static ArgumentRanking roundRanking​(NumericalArgumentRanking ranking,
                                                    int n)
        Rounds values in the given numerical argument ranking to n decimals.
        Parameters:
        ranking - a NumericalArgumentRanking
        n - decimals
        Returns:
        rounded NumericalArgumentRanking