java.text.Format.clone()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(97)

本文整理了Java中java.text.Format.clone()方法的一些代码示例,展示了Format.clone()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Format.clone()方法的具体详情如下:
包路径:java.text.Format
类名称:Format
方法名:clone

Format.clone介绍

[英]Returns a copy of this Format instance.
[中]返回此格式实例的副本。

代码示例

代码示例来源:origin: robovm/robovm

/**
 * Returns a new {@code NumberFormat} with the same properties.
 */
@Override
public Object clone() {
  return super.clone();
}

代码示例来源:origin: nutzam/nutz

public Format getDataFormat() {
  return dataFormat == null ? null : (Format)dataFormat.clone();
}

代码示例来源:origin: robovm/robovm

/**
 * Returns a new instance of {@code MessageFormat} with the same pattern and
 * formats as this {@code MessageFormat}.
 *
 * @return a shallow copy of this {@code MessageFormat}.
 * @see java.lang.Cloneable
 */
@Override
public Object clone() {
  MessageFormat clone = (MessageFormat) super.clone();
  Format[] array = new Format[formats.length];
  for (int i = formats.length; --i >= 0;) {
    if (formats[i] != null) {
      array[i] = (Format) formats[i].clone();
    }
  }
  clone.formats = array;
  return clone;
}

代码示例来源:origin: robovm/robovm

/**
 * Returns a new instance of {@code DateFormat} with the same properties.
 */
@Override
public Object clone() {
  DateFormat clone = (DateFormat) super.clone();
  clone.calendar = (Calendar) calendar.clone();
  clone.numberFormat = (NumberFormat) numberFormat.clone();
  return clone;
}

代码示例来源:origin: geotools/geotools

/**
   * Returns a clone of this parser. In current implementation, this clone is <strong>not</strong>
   * for usage in concurrent thread.
   */
  @Override
  public LineFormat clone() {
    final LineFormat copy = (LineFormat) super.clone();
    copy.data = data.clone();
    copy.limits = limits.clone();
    return copy;
  }
}

代码示例来源:origin: org.simpleflatmapper/sfm-csv

@Override
  public Format get() {
    return (Format) f.clone();
  }
}

代码示例来源:origin: arnaudroger/SimpleFlatMapper

@Override
  public Format get() {
    return (Format) f.clone();
  }
}

代码示例来源:origin: MobiVM/robovm

/**
 * Returns a new {@code NumberFormat} with the same properties.
 */
@Override
public Object clone() {
  return super.clone();
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Returns a new {@code NumberFormat} with the same properties.
 */
@Override
public Object clone() {
  return super.clone();
}

代码示例来源:origin: ibinti/bugvm

/**
 * Returns a new {@code NumberFormat} with the same properties.
 */
@Override
public Object clone() {
  return super.clone();
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Returns a new {@code NumberFormat} with the same properties.
 */
@Override
public Object clone() {
  return super.clone();
}

代码示例来源:origin: org.geotools/gt2-metadata

/**
   * Returns a clone of this parser. In current implementation, this
   * clone is <strong>not</strong> for usage in concurrent thread.
   */
  //@Override
  public Object clone() {
    final LineFormat copy = (LineFormat) super.clone();
    copy.data   = (Object[]) data.clone();
    copy.limits = (int[])  limits.clone();
    return copy;
  }
}

代码示例来源:origin: org.databene/databene-commons

@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public Object clone() {
  try {
    FormatBasedConverter copy = (FormatBasedConverter) super.clone();
    copy.format = (Format) format.clone();
    return copy;
  } catch (CloneNotSupportedException e) {
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns a new instance of {@code DateFormat} with the same properties.
 */
@Override
public Object clone() {
  DateFormat clone = (DateFormat) super.clone();
  clone.calendar = (Calendar) calendar.clone();
  clone.numberFormat = (NumberFormat) numberFormat.clone();
  return clone;
}

代码示例来源:origin: org.ojalgo/ojalgo

@SuppressWarnings("unchecked")
FormatContext(final F format) {
  super();
  ProgrammingError.throwIfNull(format);
  myFormat = (F) format.clone();
}

代码示例来源:origin: MobiVM/robovm

/**
 * Returns a new instance of {@code DateFormat} with the same properties.
 */
@Override
public Object clone() {
  DateFormat clone = (DateFormat) super.clone();
  clone.calendar = (Calendar) calendar.clone();
  clone.numberFormat = (NumberFormat) numberFormat.clone();
  return clone;
}

代码示例来源:origin: com.jtransc/jtransc-rt

public Object clone() {
  DateFormat other = (DateFormat) super.clone();
  other.calendar = (Calendar) calendar.clone();
  other.numberFormat = (NumberFormat) numberFormat.clone();
  return other;
}

代码示例来源:origin: optimatika/ojAlgo

@SuppressWarnings("unchecked")
FormatContext(final F format) {
  super();
  ProgrammingError.throwIfNull(format);
  myFormat = (F) format.clone();
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/**
 * Overrides Cloneable
 */
public Object clone()
{
  DateFormat other = (DateFormat) super.clone();
  other.calendar = (Calendar) calendar.clone();
  other.numberFormat = (NumberFormat) numberFormat.clone();
  return other;
}

代码示例来源:origin: ibinti/bugvm

/**
 * Returns a new instance of {@code DateFormat} with the same properties.
 */
@Override
public Object clone() {
  DateFormat clone = (DateFormat) super.clone();
  clone.calendar = (Calendar) calendar.clone();
  clone.numberFormat = (NumberFormat) numberFormat.clone();
  return clone;
}

相关文章