Class PathDelimiter

  • Direct Known Subclasses:
    DotDelimiter, SlashDelimiter

    public abstract class PathDelimiter
    extends java.lang.Object
    Encapsulates the delimiter of the path parts when given in n-gram format.
    Since:
    31 May 2016
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean acceptDelimInKey
      Whether to accept delimiter characters in keys
      protected char delimChar
      The delimiter character
      protected java.lang.String delimStr
      The delimiter as a string
    • Constructor Summary

      Constructors 
      Constructor Description
      PathDelimiter​(char delim)
      Creates a path delimiter with the specified character
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(java.lang.String key)
      Checks if the given key is acceptable based on delimiter rules
      char chr()
      Returns the delimiter character
      abstract java.lang.String regex()
      Returns the regex pattern for this delimiter
      java.lang.String str()
      Returns the delimiter as a string
      PathDelimiter withAcceptDelimiterInNodeName​(boolean acceptDelimInKey)
      Configures whether to accept delimiter characters in node names
      • Methods inherited from class java.lang.Object

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

      • delimChar

        protected char delimChar
        The delimiter character
      • delimStr

        protected java.lang.String delimStr
        The delimiter as a string
      • acceptDelimInKey

        protected boolean acceptDelimInKey
        Whether to accept delimiter characters in keys
    • Constructor Detail

      • PathDelimiter

        public PathDelimiter​(char delim)
        Creates a path delimiter with the specified character
    • Method Detail

      • withAcceptDelimiterInNodeName

        public PathDelimiter withAcceptDelimiterInNodeName​(boolean acceptDelimInKey)
        Configures whether to accept delimiter characters in node names
      • accept

        public boolean accept​(java.lang.String key)
        Checks if the given key is acceptable based on delimiter rules
      • str

        public java.lang.String str()
        Returns the delimiter as a string
      • chr

        public char chr()
        Returns the delimiter character
      • regex

        public abstract java.lang.String regex()
        Returns the regex pattern for this delimiter