Examples of clone()


Examples of com.ibm.icu.text.DateFormat.clone()

        DateFormat result = null;
        if (dateFormats != null) {
            result = dateFormats[dateStyle][timeStyle];
        }
        if (result != null) {
            result = (DateFormat) result.clone(); // clone for safety
            // Not sure overriding configuration is what we really want...
            result.setTimeZone(getTimeZone());
        } else {
            result = guessDateFormat(dateStyle, timeStyle);
        }
View Full Code Here

Examples of com.ibm.icu.text.NumberFormat.clone()

        NumberFormat result = null;
        if (numberFormats != null) {
            result = numberFormats[style];
        }
        if (result != null) {
            result = (NumberFormat) result.clone(); // clone for safety (later optimize)
        } else {
            result = guessNumberFormat(style);
        }
        return result;
    }
View Full Code Here

Examples of com.ibm.icu.text.SimpleDateFormat.clone()

        SimpleDateFormat tmpfmt = cachedLocaleData.get(locale);
        if (tmpfmt == null) {
            format = new SimpleDateFormat(null, locale);
            cachedLocaleData.put(locale, format);
        } else {
            format = (SimpleDateFormat)tmpfmt.clone();
        }

        String[] patterns = { "z", "zzzz", "v", "vvvv", "Z", "ZZZZ", "V", "VVVV" };
        format.applyPattern(patterns[style]);
        format.setTimeZone(this);
View Full Code Here

Examples of com.ibm.icu.util.GregorianCalendar.clone()

                    calendar.setGregorianChange(new Date(Long.MIN_VALUE));
                } else if (k == 2) {
                    calendar.setGregorianChange(new Date(Long.MAX_VALUE));
                }

                format.setCalendar((Calendar)calendar.clone());

                Date dateBefore = calendar.getTime();

                int maxYear = calendar.getActualMaximum(field);
                logln("maxYear: " + maxYear + " for " + format.format(calendar.getTime()));
View Full Code Here

Examples of com.ibm.icu.util.SimpleTimeZone.clone()

        int offset = 12345;

        SimpleTimeZone zone = new SimpleTimeZone(offset, id);
        if (zone.useDaylightTime()) errln("FAIL: useDaylightTime should return false");

        TimeZone zoneclone = (TimeZone)zone.clone();
        if (!zoneclone.equals(zone)) errln("FAIL: clone or operator== failed");
        zoneclone.setID("abc");
        if (zoneclone.equals(zone)) errln("FAIL: clone or operator!= failed");
        // delete zoneclone;
View Full Code Here

Examples of com.ibm.icu.util.TimeZone.clone()

                zoneCache.put(id, z);
            }catch(Exception ex){
                return null;
            }
        }
        return (TimeZone)z.clone();
    }
   
    public static TimeZone getGMT(){
        TimeZone z = new SimpleTimeZone(0, kGMT_ID);
        z.setID(kGMT_ID);
View Full Code Here

Examples of com.intellij.ide.browsers.BrowserSpecificSettings.clone()

    final WebBrowser dartiumInitial = DartiumUtil.getDartiumBrowser();
    myDartiumSettingsCurrent = new ChromeSettings();
    if (dartiumInitial != null) {
      final BrowserSpecificSettings browserSpecificSettings = dartiumInitial.getSpecificSettings();
      if (browserSpecificSettings instanceof ChromeSettings) {
        myDartiumSettingsCurrent = (ChromeSettings)browserSpecificSettings.clone();
      }
    }

    myDartiumPathTextWithBrowse.setText(dartiumInitial == null
                                        ? ""
View Full Code Here

Examples of com.intellij.psi.codeStyle.CodeStyleSettings.clone()

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        Assert.assertNull(myTempSettings);
        CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
        myTempSettings = settings.clone();
        CodeStyleSettings.IndentOptions indentOptions = myTempSettings.getIndentOptions(PbFileType.PROTOBUF_FILE_TYPE);
        Assert.assertNotSame(indentOptions, settings.OTHER_INDENT_OPTIONS);
        indentOptions.INDENT_SIZE = 4;
        indentOptions.TAB_SIZE = 4;
        indentOptions.CONTINUATION_INDENT_SIZE = 8;
View Full Code Here

Examples of com.jcloisterzone.figure.Meeple.clone()

    private Event freezeEvent(Event ev) {
        if (ev instanceof MeepleEvent) {
            //TODO is it really needed with new meeple events?
            MeepleEvent mev = (MeepleEvent) ev;
            Meeple m = mev.getMeeple();
            return new MeepleEvent(((MeepleEvent) ev).getTriggeringPlayer(), (Meeple) m.clone(), mev.getFrom(), mev.getTo());
        }
        return ev;
    }

    public void setReportingTool(ReportingTool reportingTool) {
View Full Code Here

Examples of com.jgoodies.forms.layout.CellConstraints.clone()

        }
    }

    private CellConstraints deriveCellConstraints(int component, int logicalColumn, int logicalRow) {
        CellConstraints constraints = format.getConstraints(component);
        constraints = (CellConstraints)constraints.clone();
        constraints.gridX += logicalToLayoutColumn(logicalColumn) + (logicalColumn > 0 && gapColumn != null ? 1 : 0);
        constraints.gridY += logicalToLayoutRow(logicalRow) + (logicalRow > 0 && gapRow != null ? 1 : 0);
        return constraints;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.