mondrian.olap
Class Id.Segment
java.lang.Object
mondrian.olap.Id.Segment
- Enclosing class:
- Id
public static class Id.Segment
- extends Object
Component in a compound identifier. It is described by its name and how
the name is quoted.
For example, the identifier
[Store].USA.[New Mexico].&[45]
has four segments:
-
-
name
public final String name
quoting
public final Id.Quoting quoting
Id.Segment
public Id.Segment(String name,
Id.Quoting quoting)
toString
public String toString()
- Overrides:
toString
in class Object
toString
public void toString(StringBuilder buf)
- Appends this segment to a StringBuffer
- Parameters:
buf
- StringBuffer
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toList
public static List<Id.Segment> toList(String... nameParts)
- Converts an array of names to a list of segments.
- Parameters:
nameParts
- Array of names
- Returns:
- List of segments
matches
public boolean matches(String name)
- Returns whether this segment matches a given name according to
the rules of case-sensitivity and quoting.
- Parameters:
name
- Name to match
- Returns:
- Whether matches