public class QualifiedName extends java.lang.Object implements java.lang.Comparable<QualifiedName>
IQualifiedNameProvider
.Modifier and Type | Field and Description |
---|---|
static QualifiedName |
EMPTY |
Modifier | Constructor and Description |
---|---|
protected |
QualifiedName(java.lang.String... segments) |
Modifier and Type | Method and Description |
---|---|
QualifiedName |
append(QualifiedName relativeQualifiedName) |
QualifiedName |
append(java.lang.String segment) |
int |
compareTo(QualifiedName qualifiedName) |
protected int |
compareTo(QualifiedName qualifiedName,
boolean ignoreCase) |
int |
compareToIgnoreCase(QualifiedName qualifiedName) |
static QualifiedName |
create(java.util.List<java.lang.String> segments)
Low-level factory method.
|
static QualifiedName |
create(java.lang.String... segments)
Low-level factory method.
|
static QualifiedName |
create(java.lang.String singleSegment)
Low-level factory method.
|
static QualifiedName |
createFromStream(org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl.EObjectInputStream eObjectInputStream)
Internal low level factory method.
|
boolean |
equals(java.lang.Object obj) |
boolean |
equalsIgnoreCase(java.lang.Object obj) |
java.lang.String |
getFirstSegment() |
java.lang.String |
getLastSegment() |
java.lang.String |
getSegment(int index) |
int |
getSegmentCount() |
java.util.List<java.lang.String> |
getSegments() |
int |
hashCode() |
boolean |
isEmpty() |
QualifiedName |
skipFirst(int skipCount) |
QualifiedName |
skipLast(int skipCount) |
boolean |
startsWith(QualifiedName prefix) |
protected boolean |
startsWith(QualifiedName prefix,
boolean ignoreCase) |
boolean |
startsWithIgnoreCase(QualifiedName prefix) |
QualifiedName |
toLowerCase() |
java.lang.String |
toString()
Returns a canonical String representation of this using '.' as namespace delimiter.
|
java.lang.String |
toString(java.lang.String delimiter)
Returns a String representation of this using
delimiter as namespace delimiter. |
QualifiedName |
toUpperCase() |
static <F> com.google.common.base.Function<F,QualifiedName> |
wrapper(com.google.common.base.Function<F,java.lang.String> nameFunction)
Wraps a name function to return a qualified name.
|
void |
writeToStream(org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl.EObjectOutputStream eObjectOutputStream)
Internal low level serialization of QualifiedNames.
|
public static final QualifiedName EMPTY
public static QualifiedName create(java.lang.String... segments)
IQualifiedNameConverter
instead.segments
- the segments of the to-be-created qualified name.
May be null
, but may not contain null
entries.QualifiedName
. Never null
.java.lang.IllegalArgumentException
- if any of the segments is nullpublic static QualifiedName createFromStream(org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl.EObjectInputStream eObjectInputStream) throws java.io.IOException
java.io.IOException
public void writeToStream(org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl.EObjectOutputStream eObjectOutputStream) throws java.io.IOException
java.io.IOException
public static QualifiedName create(java.util.List<java.lang.String> segments)
IQualifiedNameConverter
instead.segments
- the segments of the to-be-created qualified name. May be null
, but may not contain
null
entries.QualifiedName
. Never null
.java.lang.IllegalArgumentException
- if any of the segments is nullpublic static QualifiedName create(java.lang.String singleSegment)
IQualifiedNameConverter
instead.singleSegment
- the single segment of the newly created qualified namejava.lang.IllegalArgumentException
- if the singleSegment is nullpublic static <F> com.google.common.base.Function<F,QualifiedName> wrapper(com.google.common.base.Function<F,java.lang.String> nameFunction)
public boolean isEmpty()
public java.util.List<java.lang.String> getSegments()
public int getSegmentCount()
public java.lang.String getSegment(int index)
public java.lang.String getLastSegment()
public java.lang.String getFirstSegment()
public QualifiedName append(java.lang.String segment)
public QualifiedName append(QualifiedName relativeQualifiedName)
public QualifiedName skipFirst(int skipCount)
public QualifiedName skipLast(int skipCount)
public QualifiedName toLowerCase()
public QualifiedName toUpperCase()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean equalsIgnoreCase(java.lang.Object obj)
public int compareTo(QualifiedName qualifiedName)
compareTo
in interface java.lang.Comparable<QualifiedName>
public int compareToIgnoreCase(QualifiedName qualifiedName)
protected int compareTo(QualifiedName qualifiedName, boolean ignoreCase)
public boolean startsWith(QualifiedName prefix)
public boolean startsWithIgnoreCase(QualifiedName prefix)
protected boolean startsWith(QualifiedName prefix, boolean ignoreCase)
public java.lang.String toString()
IQualifiedNameConverter.toString(QualifiedName)
.toString
in class java.lang.Object
public java.lang.String toString(java.lang.String delimiter)
delimiter
as namespace delimiter.delimiter
- the delimiter to use. null
will be represented as the String "null
".delimiter