Class StemUtility


  • public class StemUtility
    extends Object

    Created by Jeff Gaynor
    on 3/24/21 at 12:38 PM

    • Constructor Detail

      • StemUtility

        public StemUtility()
    • Method Detail

      • isStem

        public static boolean isStem​(Object o)
      • areNoneStems

        public static boolean areNoneStems​(Object... objects)
      • areAllStems

        public static boolean areAllStems​(Object... objects)
      • axisDayadRecursion

        public static void axisDayadRecursion​(QDLStem out0,
                                              QDLStem left0,
                                              QDLStem right0,
                                              int depth,
                                              boolean maxDepth,
                                              StemUtility.DyadAxisAction axisAction)
        Apply some action along an axis. This will recurse to a given axis and apply an action there
        Parameters:
        out0 -
        left0 -
        right0 -
        depth -
        maxDepth -
        axisAction -
      • formatList

        public static void formatList​(QDLStem stem)
      • main

        public static void main​(String[] args)
      • stemListToString

        public static String stemListToString​(QDLStem contents,
                                              boolean forceToString)
        Convert a stem list to a string, separated by line feeds. If forceToString is true, then every elements toString is called, otherwise, if the element is not a string, an exception is thrown.
        Parameters:
        contents -
        forceToString -
        Returns:
      • mapToStem

        public static QDLStem mapToStem​(Map map)
        Convert a generic map to a stem
        Parameters:
        map -
        Returns:
      • listToStem

        public static QDLStem listToStem​(List list)
      • convert

        protected static Object convert​(Object value)
      • getType

        protected static int getType​(Object obj)