Class Datatypes


  • public final class Datatypes
    extends java.lang.Object
    Basic automata for representing common datatypes related to Unicode, XML, and XML Schema.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Datatypes()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static void buildAll()  
      private static java.util.Map<java.lang.String,​Automaton> buildMap​(java.lang.String[] exps)  
      static boolean exists​(java.lang.String name)
      Checks whether a given automaton is available.
      static Automaton get​(java.lang.String name)
      Returns pre-built automaton.
      (package private) static Automaton getWhitespaceAutomaton()  
      static boolean isUnicodeBlockName​(java.lang.String name)
      Checks whether the given string is the name of a Unicode block (see get(String)).
      static boolean isUnicodeCategoryName​(java.lang.String name)
      Checks whether the given string is the name of a Unicode category (see get(String)).
      static boolean isXMLName​(java.lang.String name)
      Checks whether the given string is the name of an XML / XML Schema automaton (see get(String)).
      private static Automaton load​(java.lang.String name)  
      static void main​(java.lang.String[] args)
      Invoke during compilation to pre-build automata.
      private static Automaton makeCodePoint​(int cp)  
      private static void put​(java.util.Map<java.lang.String,​Automaton> map, java.lang.String name, Automaton a)  
      private static void putFrom​(java.lang.String name, java.util.Map<java.lang.String,​Automaton> from)  
      private static void putWith​(java.lang.String[] exps, java.util.Map<java.lang.String,​Automaton> use)  
      private static void store​(java.lang.String name, Automaton a)  
      • Methods inherited from class java.lang.Object

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

      • automata

        private static final java.util.Map<java.lang.String,​Automaton> automata
      • unicodeblock_names

        private static final java.util.Set<java.lang.String> unicodeblock_names
      • unicodecategory_names

        private static final java.util.Set<java.lang.String> unicodecategory_names
      • xml_names

        private static final java.util.Set<java.lang.String> xml_names
      • unicodeblock_names_array

        private static final java.lang.String[] unicodeblock_names_array
      • unicodecategory_names_array

        private static final java.lang.String[] unicodecategory_names_array
      • xml_names_array

        private static final java.lang.String[] xml_names_array
    • Constructor Detail

      • Datatypes

        private Datatypes()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
        Invoke during compilation to pre-build automata. Automata are stored in the directory specified by the system property dk.brics.automaton.datatypes. (Default: build, relative to the current working directory.)
      • isUnicodeBlockName

        public static boolean isUnicodeBlockName​(java.lang.String name)
        Checks whether the given string is the name of a Unicode block (see get(String)).
      • isUnicodeCategoryName

        public static boolean isUnicodeCategoryName​(java.lang.String name)
        Checks whether the given string is the name of a Unicode category (see get(String)).
      • isXMLName

        public static boolean isXMLName​(java.lang.String name)
        Checks whether the given string is the name of an XML / XML Schema automaton (see get(String)).
      • exists

        public static boolean exists​(java.lang.String name)
        Checks whether a given automaton is available.
        Parameters:
        name - automaton name
        Returns:
        true if the automaton is available
      • load

        private static Automaton load​(java.lang.String name)
      • store

        private static void store​(java.lang.String name,
                                  Automaton a)
      • buildAll

        private static void buildAll()
      • makeCodePoint

        private static Automaton makeCodePoint​(int cp)
      • buildMap

        private static java.util.Map<java.lang.String,​Automaton> buildMap​(java.lang.String[] exps)
      • putWith

        private static void putWith​(java.lang.String[] exps,
                                    java.util.Map<java.lang.String,​Automaton> use)
      • putFrom

        private static void putFrom​(java.lang.String name,
                                    java.util.Map<java.lang.String,​Automaton> from)
      • put

        private static void put​(java.util.Map<java.lang.String,​Automaton> map,
                                java.lang.String name,
                                Automaton a)
      • getWhitespaceAutomaton

        static Automaton getWhitespaceAutomaton()