本文整理了Java中java.util.Locale.clone()
方法的一些代码示例,展示了Locale.clone()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Locale.clone()
方法的具体详情如下:
包路径:java.util.Locale
类名称:Locale
方法名:clone
[英]Overrides Cloneable.
[中]可克隆的。
代码示例来源:origin: pentaho/pentaho-kettle
@Override
public Object clone() {
TextFileInputMeta retval = (TextFileInputMeta) super.clone();
int nrFiles = fileName.length;
int nrfields = inputFields.length;
int nrfilters = filter.length;
retval.allocate( nrFiles, nrfields, nrfilters );
System.arraycopy( fileName, 0, retval.fileName, 0, nrFiles );
System.arraycopy( fileMask, 0, retval.fileMask, 0, nrFiles );
System.arraycopy( excludeFileMask, 0, retval.excludeFileMask, 0, nrFiles );
System.arraycopy( fileRequired, 0, retval.fileRequired, 0, nrFiles );
System.arraycopy( includeSubFolders, 0, retval.includeSubFolders, 0, nrFiles );
for ( int i = 0; i < nrfields; i++ ) {
retval.inputFields[i] = (TextFileInputField) inputFields[i].clone();
}
for ( int i = 0; i < nrfilters; i++ ) {
retval.filter[i] = (TextFileFilter) filter[i].clone();
}
retval.dateFormatLocale = (Locale) dateFormatLocale.clone();
retval.fileCompression = fileCompression;
return retval;
}
代码示例来源:origin: pentaho/pentaho-kettle
@Override
public ValueMetaBase clone() {
try {
ValueMetaBase valueMeta = (ValueMetaBase) super.clone();
valueMeta.dateFormat = null;
valueMeta.decimalFormat = null;
if ( dateFormatLocale != null ) {
valueMeta.dateFormatLocale = (Locale) dateFormatLocale.clone();
}
if ( dateFormatTimeZone != null ) {
valueMeta.dateFormatTimeZone = (TimeZone) dateFormatTimeZone.clone();
}
if ( storageMetadata != null ) {
valueMeta.storageMetadata = storageMetadata.clone();
}
if ( conversionMetadata != null ) {
valueMeta.conversionMetadata = conversionMetadata.clone();
}
valueMeta.compareStorageAndActualFormat();
return valueMeta;
} catch ( CloneNotSupportedException e ) {
return null;
}
}
代码示例来源:origin: robovm/robovm
Locale locale = (Locale)getLocale(transformer, contextNode).clone();
代码示例来源:origin: xalan/xalan
Locale locale = (Locale)getLocale(transformer, contextNode).clone();
代码示例来源:origin: org.apache.portals.pluto/pluto-container
@Override
public Map<Locale, String> getLocaleEncodingMappings() {
Map<Locale, String> lem = new HashMap<Locale, String>();
for (Locale l : localemap.keySet()) {
lem.put((Locale) l.clone(), localemap.get(l));
}
return lem;
}
代码示例来源:origin: org.jitsi/jain-sip-ri-ossonly
public Object clone() {
ContentLanguage retval = (ContentLanguage) super.clone();
if (this.locale != null)
retval.locale = (Locale) this.locale.clone();
return retval;
}
}
代码示例来源:origin: org.robolectric/shadows-core-v23
@Implementation
public void setTo(Configuration o) {
// commented out lines are coming in a newer version of Android SDK
realConfiguration.fontScale = o.fontScale;
realConfiguration.mcc = o.mcc;
realConfiguration.mnc = o.mnc;
if (o.locale != null) {
realConfiguration.locale = (Locale) o.locale.clone();
// realConfiguration.textLayoutDirection = o.textLayoutDirection;
}
// realConfiguration.userSetLocale = o.userSetLocale;
realConfiguration.touchscreen = o.touchscreen;
realConfiguration.keyboard = o.keyboard;
realConfiguration.keyboardHidden = o.keyboardHidden;
realConfiguration.hardKeyboardHidden = o.hardKeyboardHidden;
realConfiguration.navigation = o.navigation;
realConfiguration.navigationHidden = o.navigationHidden;
realConfiguration.orientation = o.orientation;
realConfiguration.screenLayout = o.screenLayout;
realConfiguration.uiMode = o.uiMode;
realConfiguration.screenWidthDp = o.screenWidthDp;
realConfiguration.screenHeightDp = o.screenHeightDp;
realConfiguration.smallestScreenWidthDp = o.smallestScreenWidthDp;
// realConfiguration.compatScreenWidthDp = o.compatScreenWidthDp;
// realConfiguration.compatScreenHeightDp = o.compatScreenHeightDp;
// realConfiguration.compatSmallestScreenWidthDp = o.compatSmallestScreenWidthDp;
// realConfiguration.seq = o.seq;
}
代码示例来源:origin: org.apache.portals.pluto/pluto-container
/**
* Copy constructor
*/
public LocaleTextImpl(LocaleText lt) {
this.locale = (Locale) lt.getLocale().clone();
this.text = lt.getText();
}
代码示例来源:origin: org.apache.openjpa/openjpa-all
return ((Date) obj).clone();
case JavaTypes.LOCALE:
return ((Locale) obj).clone();
default:
if (obj instanceof CachedObjectId)
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
return ((Date) obj).clone();
case JavaTypes.LOCALE:
return ((Locale) obj).clone();
default:
if (obj instanceof CachedObjectId)
代码示例来源:origin: org.apache.openjpa/openjpa-kernel
return ((Date) obj).clone();
case JavaTypes.LOCALE:
return ((Locale) obj).clone();
default:
if (obj instanceof CachedObjectId)
代码示例来源:origin: org.apache.openejb.patch/openjpa
return ((Date) obj).clone();
case JavaTypes.LOCALE:
return ((Locale) obj).clone();
default:
if (obj instanceof CachedObjectId)
代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa
return ((Date) obj).clone();
case JavaTypes.LOCALE:
return ((Locale) obj).clone();
default:
if (obj instanceof CachedObjectId)
代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1
Locale locale = (Locale)getLocale(transformer, contextNode).clone();
代码示例来源:origin: org.apache.xalan/com.springsource.org.apache.xalan
Locale locale = (Locale)getLocale(transformer, contextNode).clone();
代码示例来源:origin: MobiVM/robovm
Locale locale = (Locale)getLocale(transformer, contextNode).clone();
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
Locale locale = (Locale)getLocale(transformer, contextNode).clone();
代码示例来源:origin: com.gluonhq/robovm-rt
Locale locale = (Locale)getLocale(transformer, contextNode).clone();
代码示例来源:origin: com.bugvm/bugvm-rt
Locale locale = (Locale)getLocale(transformer, contextNode).clone();
代码示例来源:origin: ibinti/bugvm
Locale locale = (Locale)getLocale(transformer, contextNode).clone();
内容来源于网络,如有侵权,请联系作者删除!