Class FieldModifiers


  • public final class FieldModifiers
    extends java.lang.Object
    Provides some common FieldModifier implementations.

    Example usage:

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static FieldModifier NOP
      Modifier that does not modify anything.
      static FieldModifier STRIP
      Modifier that modifies the field value with String.strip().
      static FieldModifier TRIM
      Modifier that modifies the field value with String.trim().
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private FieldModifiers()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static FieldModifier lower​(java.util.Locale locale)
      Builds modifier that modifies the field value with String.toLowerCase(Locale).
      static FieldModifier upper​(java.util.Locale locale)
      Builds modifier that modifies the field value with String.toUpperCase(Locale).
      • Methods inherited from class java.lang.Object

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

      • NOP

        public static final FieldModifier NOP
        Modifier that does not modify anything.
      • TRIM

        public static final FieldModifier TRIM
        Modifier that modifies the field value with String.trim(). Comments are not modified.
      • STRIP

        public static final FieldModifier STRIP
        Modifier that modifies the field value with String.strip(). Comments are not modified.
    • Constructor Detail

      • FieldModifiers

        private FieldModifiers()
    • Method Detail

      • lower

        public static FieldModifier lower​(java.util.Locale locale)
        Builds modifier that modifies the field value with String.toLowerCase(Locale). Comments are not modified.
        Parameters:
        locale - use the case transformation rules for this locale
        Returns:
        a new field modifier that converts the input to lower-case.
      • upper

        public static FieldModifier upper​(java.util.Locale locale)
        Builds modifier that modifies the field value with String.toUpperCase(Locale). Comments are not modified.
        Parameters:
        locale - use the case transformation rules for this locale
        Returns:
        a new field modifier that converts the input to upper-case.