Class IntClamper

  • All Implemented Interfaces:
    java.util.function.IntUnaryOperator

    public class IntClamper
    extends java.lang.Object
    implements java.util.function.IntUnaryOperator
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  IntClamper.Serializer  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Integer max  
      private java.lang.Integer min  
      private java.util.function.IntUnaryOperator op  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private IntClamper​(java.lang.Integer p_i51273_1_, java.lang.Integer p_i51273_2_)  
    • Field Detail

      • min

        private final java.lang.Integer min
      • max

        private final java.lang.Integer max
      • op

        private final java.util.function.IntUnaryOperator op
    • Constructor Detail

      • IntClamper

        private IntClamper​(@Nullable
                           java.lang.Integer p_i51273_1_,
                           @Nullable
                           java.lang.Integer p_i51273_2_)
    • Method Detail

      • clamp

        public static IntClamper clamp​(int p_215843_0_,
                                       int p_215843_1_)
      • lowerBound

        public static IntClamper lowerBound​(int p_215848_0_)
      • upperBound

        public static IntClamper upperBound​(int p_215851_0_)
      • applyAsInt

        public int applyAsInt​(int p_applyAsInt_1_)
        Specified by:
        applyAsInt in interface java.util.function.IntUnaryOperator