Package mondrian.olap

Class Id.NameSegment

java.lang.Object
mondrian.olap.Id.Segment
mondrian.olap.Id.NameSegment
Enclosing class:
Id

public static class Id.NameSegment extends Id.Segment
Component in a compound identifier that describes the name of an object. Optionally, the name is quoted in brackets.
See Also:
  • Field Details

    • name

      public final String name
  • Constructor Details

    • NameSegment

      public NameSegment(String name, Id.Quoting quoting)
      Creates a name segment with the given quoting.
      Parameters:
      name - Name
      quoting - Quoting style
    • NameSegment

      public NameSegment(String name)
      Creates a quoted name segment.
      Parameters:
      name - Name
  • Method Details

    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getName

      public String getName()
    • getKeyParts

      public List<Id.NameSegment> getKeyParts()
      Specified by:
      getKeyParts in class Id.Segment
    • toString

      public void toString(StringBuilder buf)
      Description copied from class: Id.Segment
      Appends this segment to a StringBuilder.
      Specified by:
      toString in class Id.Segment
      Parameters:
      buf - String builder to write to
    • matches

      public boolean matches(String name)
      Description copied from class: Id.Segment
      Returns whether this segment matches a given name according to the rules of case-sensitivity and quoting.
      Specified by:
      matches in class Id.Segment
      Parameters:
      name - Name to match
      Returns:
      Whether matches