mondrian.olap
Class Id.Segment

java.lang.Object
  extended by 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:

 

Field Summary
 String name
           
 Id.Quoting quoting
           
 
Constructor Summary
Id.Segment(String name, Id.Quoting quoting)
           
 
Method Summary
 boolean equals(Object o)
           
 int hashCode()
           
 boolean matches(String name)
          Returns whether this segment matches a given name according to the rules of case-sensitivity and quoting.
static List<Id.Segment> toList(String... nameParts)
          Converts an array of names to a list of segments.
 String toString()
           
 void toString(StringBuilder buf)
          Appends this segment to a StringBuffer
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public final String name

quoting

public final Id.Quoting quoting
Constructor Detail

Id.Segment

public Id.Segment(String name,
                  Id.Quoting quoting)
Method Detail

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

SourceForge.net_Logo