Methods Summary |
---|
public boolean | checkAndSet(java.lang.String value, FolderConfiguration config)
LanguageQualifier qualifier = getQualifier(value);
if (qualifier != null) {
config.setLanguageQualifier(qualifier);
return true;
}
return false;
|
public boolean | equals(java.lang.Object qualifier)
if (qualifier instanceof LanguageQualifier) {
if (mValue == null) {
return ((LanguageQualifier)qualifier).mValue == null;
}
return mValue.equals(((LanguageQualifier)qualifier).mValue);
}
return false;
|
public static java.lang.String | getFolderSegment(java.lang.String value)Returns the folder name segment for the given value. This is equivalent to calling
{@link #toString()} on a {@link LanguageQualifier} object.
String segment = value.toLowerCase();
if (sLanguagePattern.matcher(segment).matches()) {
return segment;
}
return null;
|
public org.eclipse.swt.graphics.Image | getIcon()
return IconFactory.getInstance().getIcon("language"); //$NON-NLS-1$
|
public java.lang.String | getName()
return NAME;
|
public static com.android.ide.eclipse.editors.resources.configurations.LanguageQualifier | getQualifier(java.lang.String segment)Creates and returns a qualifier from the given folder segment. If the segment is incorrect,
null is returned.
if (sLanguagePattern.matcher(segment).matches()) {
LanguageQualifier qualifier = new LanguageQualifier();
qualifier.mValue = segment;
return qualifier;
}
return null;
|
public java.lang.String | getShortName()
return NAME;
|
public java.lang.String | getStringValue()
if (mValue != null) {
return mValue;
}
return ""; //$NON-NLS-1$
|
public java.lang.String | getValue()
if (mValue != null) {
return mValue;
}
return ""; //$NON-NLS-1$
|
public int | hashCode()
if (mValue != null) {
return mValue.hashCode();
}
return 0;
|
public boolean | isValid()
return mValue != null;
|
public java.lang.String | toString()Returns the string used to represent this qualifier in the folder name.
if (mValue != null) {
return getFolderSegment(mValue);
}
return ""; //$NON-NLS-1$
|