Class CypherPrinter


  • public final class CypherPrinter
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      CypherPrinter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.neo4j.graphalgo.utils.cypher.CypherPrinter.CypherParameter parameter​(java.lang.String value)  
      @NotNull java.lang.String toCypherString​(@Nullable java.lang.Object value)
      Renders any java type as a Cypher expression.
      @NotNull java.lang.String toCypherStringOr​(@Nullable java.lang.Object value, @NotNull java.lang.String ifEmpty)
      Renders any java type as a Cypher expression.
      org.neo4j.graphalgo.utils.cypher.CypherPrinter.CypherVariable variable​(java.lang.String value)  
      • Methods inherited from class java.lang.Object

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

      • CypherPrinter

        public CypherPrinter()
    • Method Detail

      • toCypherString

        @NotNull
        public @NotNull java.lang.String toCypherString​(@Nullable
                                                        @Nullable java.lang.Object value)
        Renders any java type as a Cypher expression. Supported types are primitives, CharSequences, Enums, Iterables, and Maps. Empty lists and maps, as well as null, are considered to be "empty" and will be ignored.
        Returns:
        A Cypher expression string for the type or the empty string if the type was empty
        Throws:
        java.lang.IllegalArgumentException - if the given type is not supported
      • toCypherStringOr

        @NotNull
        public @NotNull java.lang.String toCypherStringOr​(@Nullable
                                                          @Nullable java.lang.Object value,
                                                          @NotNull
                                                          @NotNull java.lang.String ifEmpty)
        Renders any java type as a Cypher expression. Supported types are primitives, CharSequences, Enums, Iterables, and Maps. Empty lists and maps, as well as null, are considered to be "empty" and will be ignored.
        Returns:
        A Cypher expression string for the type or the given fallback value if the type was empty
        Throws:
        java.lang.IllegalArgumentException - if the given type is not supported
      • parameter

        public org.neo4j.graphalgo.utils.cypher.CypherPrinter.CypherParameter parameter​(java.lang.String value)
      • variable

        public org.neo4j.graphalgo.utils.cypher.CypherPrinter.CypherVariable variable​(java.lang.String value)