Methods Summary |
---|
public boolean | checkAndSet(java.lang.String value, FolderConfiguration config)
RegionQualifier qualifier = getQualifier(value);
if (qualifier != null) {
config.setRegionQualifier(qualifier);
return true;
}
return false;
|
public boolean | equals(java.lang.Object qualifier)
if (qualifier instanceof RegionQualifier) {
if (mValue == null) {
return ((RegionQualifier)qualifier).mValue == null;
}
return mValue.equals(((RegionQualifier)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 RegionQualifier} object.
if (value != null) {
String segment = "r" + value.toUpperCase(); //$NON-NLS-1$
if (sRegionPattern.matcher(segment).matches()) {
return segment;
}
}
return ""; //$NON-NLS-1$
|
public org.eclipse.swt.graphics.Image | getIcon()
return IconFactory.getInstance().getIcon("region"); //$NON-NLS-1$
|
public java.lang.String | getName()
return NAME;
|
public static com.android.ide.eclipse.editors.resources.configurations.RegionQualifier | getQualifier(java.lang.String segment)Creates and returns a qualifier from the given folder segment. If the segment is incorrect,
null is returned.
Matcher m = sRegionPattern.matcher(segment);
if (m.matches()) {
RegionQualifier qualifier = new RegionQualifier();
qualifier.mValue = m.group(1);
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.
return getFolderSegment(mValue);
|