java.lang.Object
com.couchbase.client.java.manager.view.View

@Volatile public class View extends Object
A view index specification consisting of a 'map' function and optionally a 'reduce' function.
  • Constructor Details

    • View

      public View(String map)
      Create a new view with the given map function and no reduce function.
      Parameters:
      map - map function for this view
    • View

      public View(String map, String reduce)
      Creates a new view with a map function and a reduce function.
      Parameters:
      map - map function for this view
      reduce - reduce function for this view (may be null)
  • Method Details

    • map

      public String map()
      Returns the map function.
    • reduce

      public Optional<String> reduce()
      Returns the reduce function if this view has one.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object