Class SGFParser


  • public class SGFParser
    extends Object
    • Constructor Detail

      • SGFParser

        public SGFParser()
    • Method Detail

      • loadFromString

        public static boolean loadFromString​(String sgfString)
      • convertSgfPosToCoord

        public static int[] convertSgfPosToCoord​(String pos)
      • isListProperty

        public static boolean isListProperty​(String key)
      • isMarkupProperty

        public static boolean isMarkupProperty​(String key)
      • getOrDefault

        public static String getOrDefault​(Map<String,​String> props,
                                          String key,
                                          String defaultValue)
        Get a value with key, or the default if there is no such key
        Parameters:
        key -
        defaultValue -
        Returns:
      • addProperty

        public static void addProperty​(Map<String,​String> props,
                                       String key,
                                       String value)
        Add a key and value to the props
        Parameters:
        key -
        value -
      • addProperties

        public static void addProperties​(Map<String,​String> props,
                                         Map<String,​String> addProps)
        Add the properties by mutating the props
      • addProperties

        public static void addProperties​(Map<String,​String> props,
                                         String propsStr)
        Add the properties from string
      • propertiesString

        public static String propertiesString​(Map<String,​String> props)
        Get properties string by the props
        Returns:
      • nodeString

        public static String nodeString​(String key,
                                        String value)
        Get node string by the key and value
        Parameters:
        key -
        value -
        Returns: