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:
Id.KeySegment
-
-
Field Summary
Fields Modifier and Type Field Description String
name
-
Fields inherited from class mondrian.olap.Id.Segment
quoting
-
-
Constructor Summary
Constructors Constructor Description NameSegment(String name)
Creates a quoted name segment.NameSegment(String name, Id.Quoting quoting)
Creates a name segment with the given quoting.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
List<Id.NameSegment>
getKeyParts()
String
getName()
int
hashCode()
boolean
matches(String name)
Returns whether this segment matches a given name according to the rules of case-sensitivity and quoting.void
toString(StringBuilder buf)
Appends this segment to a StringBuilder.-
Methods inherited from class mondrian.olap.Id.Segment
getQuoting, toList, toString
-
-
-
-
Field Detail
-
name
public final String name
-
-
Constructor Detail
-
NameSegment
public NameSegment(String name, Id.Quoting quoting)
Creates a name segment with the given quoting.- Parameters:
name
- Namequoting
- Quoting style
-
NameSegment
public NameSegment(String name)
Creates a quoted name segment.- Parameters:
name
- Name
-
-
Method Detail
-
getName
public String getName()
-
getKeyParts
public List<Id.NameSegment> getKeyParts()
- Specified by:
getKeyParts
in classId.Segment
-
toString
public void toString(StringBuilder buf)
Description copied from class:Id.Segment
Appends this segment to a StringBuilder.- Specified by:
toString
in classId.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 classId.Segment
- Parameters:
name
- Name to match- Returns:
- Whether matches
-
-