Class DotPath

java.lang.Object
org.springframework.data.mongodb.util.DotPath

public class DotPath extends Object
Value object representing a dot path.
Since:
3.2
Author:
Mark Paluch
  • Method Details

    • from

      public static DotPath from(@Nullable String dotPath)
      Creates a new DotPath from dotPath.
      Parameters:
      dotPath - the dot path, can be empty or null.
      Returns:
      the DotPath representing dotPath.
    • empty

      public static DotPath empty()
      Returns an empty dotpath.
      Returns:
      an empty dotpath.
    • append

      public DotPath append(String segment)
      Append a segment to the dotpath. If the dotpath is not empty, then segments are separated with a dot.
      Parameters:
      segment - the segment to append.
      Returns:
    • isEmpty

      public boolean isEmpty()
      Returns whether this dotpath is empty.
      Returns:
      whether this dotpath is empty.
    • toString

      public String toString()
      Overrides:
      toString in class Object