rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public T next() { final Map.Entry e = (Map.Entry) super.next(); return (T) new Map.Entry() { public boolean equals(Object o) { return e.equals(o); } public Object getKey() { return e.getKey(); } public Object getValue() { return e.getValue(); } public int hashCode() { return e.hashCode(); } public Object setVa...
public Map.Entry<K, V> next() { synchronized (super.mutex) { return new SynchronizedMapEntry<K, V>(super.next()); } }
public T next() { final Map.Entry e = (Map.Entry) super.next(); return (T) new Map.Entry() { /** * Returns <code>true</code> if the object, o, is also a map entry with an * identical key and value. * * @param o the object to compare. ...
SynchronizedSet(Object sync, Set<T> s)
SynchronizedSet(Set<T> s)
SynchronizedSet(Object sync, Set<T> s) { super(sync, s); }
super(sync, s);
super(s);
SynchronizedSet(Object sync, Set<T> s) { super(sync, s); }
public static final <T> List<T> emptyList() { return EMPTY_LIST;
public static final <T> List<T> emptyList() { return new EmptyList<T>();
public static final <T> List<T> emptyList() { return EMPTY_LIST; }
public static final <K,V> Map<K,V> emptyMap() { return EMPTY_MAP;
public static final <K,V> Map<K,V> emptyMap() { return new EmptyMap<K,V>();
public static final <K,V> Map<K,V> emptyMap() { return EMPTY_MAP; }
public static final <T> Set<T> emptySet() { return EMPTY_SET;
public static final <T> Set<T> emptySet() { return new EmptySet<T>();
public static final <T> Set<T> emptySet() { return EMPTY_SET; }
public static <T> Comparator<T> reverseOrder()
public static <T> Comparator<T> reverseOrder(final Comparator<T> c)
public static <T> Comparator<T> reverseOrder() { return (Comparator<T>) rcInstance; }
return (Comparator<T>) rcInstance;
if (c == null) return (Comparator<T>) rcInstance; return new ReverseComparator<T> () { public int compare(T a, T b) { return - c.compare(a, b); } };
public static <T> Comparator<T> reverseOrder() { return (Comparator<T>) rcInstance; }
public static void rotate(List<? super Object> list, int distance)
public static void rotate(List<?> list, int distance)
public static void rotate(List<? super Object> list, int distance) { int size = list.size(); if (size == 0) return; distance %= size; if (distance == 0) return; if (distance < 0) distance += size; if (isSequential(list)) { reverse(list); reverse(list.subList(0, dis...
Object o = list.get(lcm);
Object o = objList.get(lcm);
public static void rotate(List<? super Object> list, int distance) { int size = list.size(); if (size == 0) return; distance %= size; if (distance == 0) return; if (distance < 0) distance += size; if (isSequential(list)) { reverse(list); reverse(list.subList(0, dis...
o = list.set(i, o); list.set(lcm, o);
o = objList.set(i, o); objList.set(lcm, o);
public static void rotate(List<? super Object> list, int distance) { int size = list.size(); if (size == 0) return; distance %= size; if (distance == 0) return; if (distance < 0) distance += size; if (isSequential(list)) { reverse(list); reverse(list.subList(0, dis...
public static void shuffle(List<? super Object> l)
public static void shuffle(List<?> l)
public static void shuffle(List<? super Object> l) { if (defaultRandom == null) { synchronized (Collections.class) { if (defaultRandom == null) defaultRandom = new Random(); } } shuffle(l, defaultRandom); }
public static void swap(List<? super Object> l, int i, int j)
public static void swap(List<?> l, int i, int j)
public static void swap(List<? super Object> l, int i, int j) { l.set(i, l.set(j, l.get(i))); }
l.set(i, l.set(j, l.get(i)));
List<Object> list = (List<Object>) l; list.set(i, list.set(j, list.get(i)));
public static void swap(List<? super Object> l, int i, int j) { l.set(i, l.set(j, l.get(i))); }
this.allThreads = new VmThreadQueue("all", false, true, false);
this.allThreadsLock = new SpinLock(); this.allThreads = new VmThreadQueue.AllThreadsQueue("all");
public Vm(String version, VmArchitecture arch, VmHeapManager heapManager, VmStatics statics, boolean debugMode) { instance = this; this.version = version; this.debugMode = debugMode; this.bootstrap = true; this.arch = arch; this.heapManager = heapManager; this.statics = statics; this.processors = new BootableA...
getVm().allThreads.add(thread, true, "Vm");
final Vm vm = getVm(); final VmThreadQueue.AllThreadsQueue q = vm.allThreads; if (isWritingImage()) { q.add(thread, "Vm"); } else { final SpinLock lock = vm.allThreadsLock; lock.lock(); try { q.add(thread, "Vm"); } finally { lock.unlock(); } }
static final void registerThread(VmThread thread) { getVm().allThreads.add(thread, true, "Vm"); }
getVm().allThreads.remove(thread);
final Vm vm = getVm(); final SpinLock lock = vm.allThreadsLock; final VmThreadQueue.AllThreadsQueue q = vm.allThreads; lock.lock(); try { q.remove(thread); } finally { lock.unlock(); }
static final void unregisterThread(VmThread thread) { getVm().allThreads.remove(thread); }
return getVm().allThreads.visit(visitor);
final Vm vm = getVm(); final SpinLock lock = vm.allThreadsLock; final VmThreadQueue.AllThreadsQueue q = vm.allThreads; lock.lock(); try { return q.visit(visitor); } finally { lock.unlock(); }
static final boolean visitAllThreads(VmThreadVisitor visitor) { return getVm().allThreads.visit(visitor); }
public Scrollbar() {
Scrollbar() {
public Scrollbar() { this(VERTICAL); }
public synchronized void addAdjustmentListener(AdjustmentListener listener) {
addAdjustmentListener(AdjustmentListener listener) {
public synchronized void addAdjustmentListener(AdjustmentListener listener) { adjustment_listeners = AWTEventMulticaster.add(adjustment_listeners, listener); enableEvents(AWTEvent.ADJUSTMENT_EVENT_MASK); }
public synchronized void addNotify() {
addNotify() {
public synchronized void addNotify() { if (peer == null) peer = getToolkit().createScrollbar(this); super.addNotify(); }
void dispatchEventImpl(AWTEvent e) {
dispatchEventImpl(AWTEvent e) {
void dispatchEventImpl(AWTEvent e) { if (e.id <= AdjustmentEvent.ADJUSTMENT_LAST && e.id >= AdjustmentEvent.ADJUSTMENT_FIRST && (adjustment_listeners != null || (eventMask & AWTEvent.ADJUSTMENT_EVENT_MASK) != 0)) processEvent(e); else super.dispatchEventImpl(e); }
public int getBlockIncrement() { return (pageIncrement); }
getBlockIncrement() { return getPageIncrement (); }
public int getBlockIncrement() { return (pageIncrement); }
public int getLineIncrement() { return (lineIncrement); }
getLineIncrement() { return lineIncrement; }
public int getLineIncrement() { return (lineIncrement); }
public int getMaximum() { return (maximum); }
getMaximum() { return(maximum); }
public int getMaximum() { return (maximum); }
public int getMinimum() { return (minimum); }
getMinimum() { return(minimum); }
public int getMinimum() { return (minimum); }
public int getOrientation() { return (orientation); }
getOrientation() { return(orientation); }
public int getOrientation() { return (orientation); }
public int getPageIncrement() { return (pageIncrement); }
getPageIncrement() { return pageIncrement; }
public int getPageIncrement() { return (pageIncrement); }
public int getUnitIncrement() { return (lineIncrement); }
getUnitIncrement() { return getLineIncrement (); }
public int getUnitIncrement() { return (lineIncrement); }
public int getValue() { return (value); }
getValue() { return(value); }
public int getValue() { return (value); }
public int getVisible() { return (getVisibleAmount()); }
getVisible() { return visibleAmount; }
public int getVisible() { return (getVisibleAmount()); }
public int getVisibleAmount() { return (visibleAmount); }
getVisibleAmount() { return getVisible (); }
public int getVisibleAmount() { return (visibleAmount); }
protected String paramString() { return ( "value=" + getValue() + ",visibleAmount=" + getVisibleAmount() + ",minimum=" + getMinimum() + ",maximum=" + getMaximum() + ",pageIncrement=" + pageIncrement + ",lineIncrement=" + lineIncrement + ",orientation=" + (orientation == HORIZONTAL ? "HORIZONTAL" : "VERTICAL")
paramString() { return("value=" + getValue() + ",visibleAmount=" + getVisibleAmount() + ",minimum=" + getMinimum() + ",maximum=" + getMaximum() + ",pageIncrement=" + pageIncrement + ",lineIncrement=" + lineIncrement + ",orientation=" + (orientation == HORIZONTAL ? "HORIZONTAL" : "VERTICAL")
protected String paramString() { return ( "value=" + getValue() + ",visibleAmount=" + getVisibleAmount() + ",minimum=" + getMinimum() + ",maximum=" + getMaximum() + ",pageIncrement=" + pageIncrement + ",lineIncrement=" + lineIncrement + ",orientation=" + (orientation == HORIZO...
protected void processAdjustmentEvent(AdjustmentEvent event) {
processAdjustmentEvent(AdjustmentEvent event) { value = event.getValue();
protected void processAdjustmentEvent(AdjustmentEvent event) { if (adjustment_listeners != null) adjustment_listeners.adjustmentValueChanged(event); }
protected void processEvent(AWTEvent event) {
processEvent(AWTEvent event) {
protected void processEvent(AWTEvent event) { if (event instanceof AdjustmentEvent) processAdjustmentEvent((AdjustmentEvent) event); else super.processEvent(event); }
public synchronized void removeAdjustmentListener(AdjustmentListener listener) { adjustment_listeners = AWTEventMulticaster.remove(adjustment_listeners, listener); }
removeAdjustmentListener(AdjustmentListener listener) { adjustment_listeners = AWTEventMulticaster.remove(adjustment_listeners, listener); }
public synchronized void removeAdjustmentListener(AdjustmentListener listener) { adjustment_listeners = AWTEventMulticaster.remove(adjustment_listeners, listener); }
public synchronized void setBlockIncrement(int blockIncrement) { if (blockIncrement < 0) throw new IllegalArgumentException("Block increment less than zero."); int range = maximum - minimum; if (blockIncrement > range) { if (range == 0) blockIncrement = 1; else blockIncrement = range; } if (blockIncrement == pageIncr...
setBlockIncrement(int blockIncrement) { setPageIncrement (blockIncrement); }
public synchronized void setBlockIncrement(int blockIncrement) { if (blockIncrement < 0) throw new IllegalArgumentException("Block increment less than zero."); int range = maximum - minimum; if (blockIncrement > range) { if (range == 0) blockIncrement = 1; else blockIncrement = range; } if (blockIncre...
public void setLineIncrement(int lineIncrement) { setUnitIncrement(lineIncrement);
setLineIncrement(int lineIncrement) { if (lineIncrement < 0) throw new IllegalArgumentException ("Unit increment less than zero."); int range = maximum - minimum; if (lineIncrement > range) { if (range == 0) lineIncrement = 1; else lineIncrement = range;
public void setLineIncrement(int lineIncrement) { setUnitIncrement(lineIncrement); }
if (lineIncrement == this.lineIncrement) return; this.lineIncrement = lineIncrement; ScrollbarPeer peer = (ScrollbarPeer) getPeer (); if (peer != null) peer.setLineIncrement (this.lineIncrement); }
public void setLineIncrement(int lineIncrement) { setUnitIncrement(lineIncrement); }
public void setMaximum(int maximum) {
setMaximum(int maximum) {
public void setMaximum(int maximum) { setValues(value, visibleAmount, minimum, maximum); }
public void setMinimum(int minimum) {
setMinimum(int minimum) {
public void setMinimum(int minimum) { setValues(value, visibleAmount, minimum, maximum); }
public void setOrientation(int orientation) {
setOrientation(int orientation) {
public void setOrientation(int orientation) { if ((orientation != HORIZONTAL) && (orientation != VERTICAL)) throw new IllegalArgumentException("Bad orientation value: " + orientation); // FIXME: Communicate to peer? Or must this be called before peer creation? this.orientation = orientation; }
public void setPageIncrement(int pageIncrement) { setBlockIncrement(pageIncrement);
setPageIncrement(int pageIncrement) { if (pageIncrement < 0) throw new IllegalArgumentException ("Block increment less than zero."); int range = maximum - minimum; if (pageIncrement > range) { if (range == 0) pageIncrement = 1; else pageIncrement = range;
public void setPageIncrement(int pageIncrement) { setBlockIncrement(pageIncrement); }
if (pageIncrement == this.pageIncrement) return; this.pageIncrement = pageIncrement; ScrollbarPeer peer = (ScrollbarPeer) getPeer (); if (peer != null) peer.setPageIncrement (this.pageIncrement); }
public void setPageIncrement(int pageIncrement) { setBlockIncrement(pageIncrement); }
public synchronized void setUnitIncrement(int unitIncrement) { if (unitIncrement < 0) throw new IllegalArgumentException("Unit increment less than zero."); int range = maximum - minimum; if (unitIncrement > range) { if (range == 0) unitIncrement = 1; else unitIncrement = range; } if (unitIncrement == lineIncrement) r...
setUnitIncrement(int unitIncrement) { setLineIncrement (unitIncrement); }
public synchronized void setUnitIncrement(int unitIncrement) { if (unitIncrement < 0) throw new IllegalArgumentException("Unit increment less than zero."); int range = maximum - minimum; if (unitIncrement > range) { if (range == 0) unitIncrement = 1; else unitIncrement = range; } if (unitIncrement == ...
public void setValue(int value) {
setValue(int value) {
public void setValue(int value) { setValues(value, visibleAmount, minimum, maximum); }
public synchronized void setValues(int value, int visibleAmount, int minimum, int maximum) {
setValues(int value, int visibleAmount, int minimum, int maximum) {
public synchronized void setValues(int value, int visibleAmount, int minimum, int maximum) { if (maximum < minimum) maximum = minimum; if (value < minimum) value = minimum; if (value > maximum) value = maximum; if (visibleAmount > value) visibleAmount = value; this.value = value; this.visibleAmount = vis...
if (visibleAmount > value) visibleAmount = value;
if (visibleAmount > maximum - minimum) visibleAmount = maximum - minimum; ScrollbarPeer peer = (ScrollbarPeer) getPeer (); if (peer != null && (this.value != value || this.visibleAmount != visibleAmount || this.minimum != minimum || this.maximum != maximum)) peer.setValues(value, visibleAmount, minimum, maximum);
public synchronized void setValues(int value, int visibleAmount, int minimum, int maximum) { if (maximum < minimum) maximum = minimum; if (value < minimum) value = minimum; if (value > maximum) value = maximum; if (visibleAmount > value) visibleAmount = value; this.value = value; this.visibleAmount = vis...
ScrollbarPeer sp = (ScrollbarPeer) getPeer(); if (sp != null) sp.setValues(value, visibleAmount, minimum, maximum);
public synchronized void setValues(int value, int visibleAmount, int minimum, int maximum) { if (maximum < minimum) maximum = minimum; if (value < minimum) value = minimum; if (value > maximum) value = maximum; if (visibleAmount > value) visibleAmount = value; this.value = value; this.visibleAmount = vis...
if (sp != null) sp.setLineIncrement(lineIncrement);
if (peer != null) peer.setLineIncrement(lineIncrement);
public synchronized void setValues(int value, int visibleAmount, int minimum, int maximum) { if (maximum < minimum) maximum = minimum; if (value < minimum) value = minimum; if (value > maximum) value = maximum; if (visibleAmount > value) visibleAmount = value; this.value = value; this.visibleAmount = vis...
if (sp != null) sp.setPageIncrement(pageIncrement); }
if (peer != null) peer.setPageIncrement(pageIncrement);
public synchronized void setValues(int value, int visibleAmount, int minimum, int maximum) { if (maximum < minimum) maximum = minimum; if (value < minimum) value = minimum; if (value > maximum) value = maximum; if (visibleAmount > value) visibleAmount = value; this.value = value; this.visibleAmount = vis...
}
public synchronized void setValues(int value, int visibleAmount, int minimum, int maximum) { if (maximum < minimum) maximum = minimum; if (value < minimum) value = minimum; if (value > maximum) value = maximum; if (visibleAmount > value) visibleAmount = value; this.value = value; this.visibleAmount = vis...
public void setVisibleAmount(int visibleAmount) {
setVisibleAmount(int visibleAmount) {
public void setVisibleAmount(int visibleAmount) { setValues(value, visibleAmount, minimum, maximum); }
log.info("BestConfig:" + config);
log.debug("BestConfig:" + config);
final RadeonSurface open(RadeonConfiguration config) throws ResourceNotFreeException { // Get the best matching config config = fbinfo.getBestConfiguration(config); log.info("BestConfig:" + config); // Calculate new configuration final DisplayMode mode = config.getDisplayMode(); final int width = mode.getW...
subElements = ((MenuElement) selectedPath.get(i)).getSubElements();
MenuElement first = (MenuElement) selectedPath.get(i); if (SwingUtilities.isDescendingFrom(c, first.getComponent())) { ret = true; break; } else { subElements = first.getSubElements();
public boolean isComponentPartOfCurrentMenu(Component c) { MenuElement[] subElements; for (int i = 0; i < selectedPath.size(); i++) { subElements = ((MenuElement) selectedPath.get(i)).getSubElements(); for (int j = 0; j < subElements.length; j++) { MenuElement me = sub...
if (me != null && (me.getComponent()).equals(c)) return true;
if (me != null && (SwingUtilities.isDescendingFrom(c, me.getComponent()))) { ret = true; break; } }
public boolean isComponentPartOfCurrentMenu(Component c) { MenuElement[] subElements; for (int i = 0; i < selectedPath.size(); i++) { subElements = ((MenuElement) selectedPath.get(i)).getSubElements(); for (int j = 0; j < subElements.length; j++) { MenuElement me = sub...
return false;
return ret;
public boolean isComponentPartOfCurrentMenu(Component c) { MenuElement[] subElements; for (int i = 0; i < selectedPath.size(); i++) { subElements = ((MenuElement) selectedPath.get(i)).getSubElements(); for (int j = 0; j < subElements.length; j++) { MenuElement me = sub...
throws NotImplementedException
public void processKeyEvent(KeyEvent e) { throw new UnsupportedOperationException("not implemented"); }
if (point != null) {
public int columnAtPoint(Point point) { if (point != null) { int ncols = getColumnCount(); Dimension gap = getIntercellSpacing(); TableColumnModel cols = getColumnModel(); int x = point.x; for (int i = 0; i < ncols; ++i) { int width = cols.getColumn(i).g...
}
public int columnAtPoint(Point point) { if (point != null) { int ncols = getColumnCount(); Dimension gap = getIntercellSpacing(); TableColumnModel cols = getColumnModel(); int x = point.x; for (int i = 0; i < ncols; ++i) { int width = cols.getColumn(i).g...
int h = (rowHeight + rowMargin); int delta = h * direction;
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { // FIXME: I don't exactly know what sun does here. in both cases they // pick values which do *not* simply expose the next cell in a given // scroll direction. if (orientation == SwingConstants.VERTICAL) r...
return direction * rowHeight; else
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { // FIXME: I don't exactly know what sun does here. in both cases they // pick values which do *not* simply expose the next cell in a given // scroll direction. if (orientation == SwingConstants.VERTICAL) r...
int sum = 0; for (int i = 0; i < getColumnCount(); ++i) sum += columnModel.getColumn(0).getWidth(); int inc = getColumnCount() == 0 ? 10 : sum / getColumnCount(); return direction * inc;
int near = ((visibleRect.y + delta + h / 2) / h) * h; int diff = visibleRect.y + delta - near; delta -= diff;
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { // FIXME: I don't exactly know what sun does here. in both cases they // pick values which do *not* simply expose the next cell in a given // scroll direction. if (orientation == SwingConstants.VERTICAL) r...
return delta;
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { // FIXME: I don't exactly know what sun does here. in both cases they // pick values which do *not* simply expose the next cell in a given // scroll direction. if (orientation == SwingConstants.VERTICAL) r...
char c = (char) ((b1 << 8) | b2);
char c = (char) (((b1 & 0xFF) << 8) | (b2 & 0xFF));
protected CoderResult decodeLoop (ByteBuffer in, CharBuffer out) { // TODO: Optimize this in the case in.hasArray() / out.hasArray() int inPos = in.position (); try { while (in.remaining () >= 2) { byte b1 = in.get (); byte b2 = in.get (); // handle byte...
throw new RuntimeException ("couldn't set java.awt.Component.peer field");
throw new AssertionError (e);
public void addNotify() { // Assume we're using ClasspathToolkit ClasspathToolkit tk = (ClasspathToolkit) getToolkit(); // Circumvent the package-privateness of the AWT internal // java.awt.Component.peer member variable. try { Field peerField = Component.class.getDeclaredField("peer"); AccessCon...
Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu)e.nextElement(); mi.addNotify(); }
addNotify(){ if (getPeer() == null) setPeer((MenuComponentPeer)getToolkit().createMenuBar(this));}
remove(MenuComponent menu)
remove(int index)
remove(MenuComponent menu){ int index = menus.indexOf(menu); if (index == -1) return; remove(index);}
int index = menus.indexOf(menu); if (index == -1) return;
Menu m = (Menu) menus.get (index); menus.remove (index); m.removeNotify (); m.parent = null;
remove(MenuComponent menu){ int index = menus.indexOf(menu); if (index == -1) return; remove(index);}
remove(index);
if (peer != null) { MenuBarPeer mp = (MenuBarPeer) peer; mp.delMenu (index); }
remove(MenuComponent menu){ int index = menus.indexOf(menu); if (index == -1) return; remove(index);}
Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu) e.nextElement(); mi.removeNotify(); }
removeNotify(){ super.removeNotify();}
return null;
return AccessibleRole.SLIDER;
public AccessibleRole getAccessibleRole() { return null; }
return null;
AccessibleStateSet result = super.getAccessibleStateSet(); if (orientation == JSlider.HORIZONTAL) result.add(AccessibleState.HORIZONTAL); else if (orientation == JSlider.VERTICAL) result.add(AccessibleState.VERTICAL); return result;
public AccessibleStateSet getAccessibleStateSet() { return null; }
return null;
return this;
public AccessibleValue getAccessibleValue() { return null; }
return null;
return new Integer(getValue());
public Number getCurrentAccessibleValue() { return null; }
return null;
return new Integer(getMaximum());
public Number getMaximumAccessibleValue() { return null; }
return null;
return new Integer(getMinimum());
public Number getMinimumAccessibleValue() { return null; }
public boolean setCurrentAccessibleValue(Number value0)
public boolean setCurrentAccessibleValue(Number value)
public boolean setCurrentAccessibleValue(Number value0) { return false; }
Number oldValue = getCurrentAccessibleValue(); setValue(value.intValue()); firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue, new Integer(getValue())); return true;
public boolean setCurrentAccessibleValue(Number value0) { return false; }
if (sm != null)
if (sm != null && VMStackWalker.getCallingClassLoader() != null)
public static String getProperty(String key) { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkSecurityAccess("getProperty." + key); return secprops.getProperty(key); }
if (name == null) return null; else { name = name.trim(); if (name.length() == 0) return null; }
public static Provider getProvider(String name) { Provider p; int max = providers.size (); for (int i = 0; i < max; i++) { p = (Provider) providers.elementAt(i); if (p.getName().equals(name)) return p; } return null; }
providers.addElement(Class.forName(name).newInstance());
ClassLoader sys = ClassLoader.getSystemClassLoader(); providers.addElement(Class.forName(name, true, sys).newInstance());
private static boolean loadProviders(String baseUrl, String vendor) { if (baseUrl == null || vendor == null) return false; boolean result = true; String secfilestr = baseUrl + "/security/" + vendor + ".security"; try { InputStream fin = new URL(secfilestr).openStream(); ...
{ }
{ createDefaultTheme(); }
public MetalLookAndFeel() { }
if(value==null) throw new NullPointerException();
public void setAmPmStrings (String[] value) { ampms = value; }
if(labels==null) throw new NullPointerException();
public void setEras (String[] labels) { eras = labels; }
if(chars==null) throw new NullPointerException();
public void setLocalPatternChars (String chars) { localPatternChars = chars; }
if(labels==null) throw new NullPointerException();
public void setMonths (String[] labels) { months = labels; }
if(labels==null) throw new NullPointerException();
public void setShortMonths (String[] labels) { shortMonths = labels; }
if(labels==null) throw new NullPointerException();
public void setShortWeekdays (String[] labels) { shortWeekdays = labels; }
if(labels==null) throw new NullPointerException();
public void setWeekdays (String[] labels) { weekdays = labels; }
if(zones==null) throw new NullPointerException();
public void setZoneStrings (String[][] zones) { zoneStrings = zones; }
return new AbstractMap.BasicMapEntry<K, V>(enumClass.getEnumConstants()[index],
return new AbstractMap.SimpleEntry<K, V>(enumClass.getEnumConstants()[index],
public Set<Map.Entry<K, V>> entrySet() { if (entries == null) { entries = new AbstractSet<Map.Entry<K, V>>() { public int size() { return cardinality; } public Iterator<Map.Entry<K, V>> iterator() { return new Iterator<Map.Entry<K, V>>() { int count = 0; int index = -1; ...
return new AbstractMap.BasicMapEntry<K, V>(enumClass.getEnumConstants()[index],
return new AbstractMap.SimpleEntry<K, V>(enumClass.getEnumConstants()[index],
public Iterator<Map.Entry<K, V>> iterator() { return new Iterator<Map.Entry<K, V>>() { int count = 0; int index = -1; public boolean hasNext() { return count < cardinality; } public Map.Entry<K,V> next() { ++count; for (++index; store[index] == emptySlot; ++inde...
return new AbstractMap.BasicMapEntry<K, V>(enumClass.getEnumConstants()[index],
return new AbstractMap.SimpleEntry<K, V>(enumClass.getEnumConstants()[index],
public Map.Entry<K,V> next() { ++count; for (++index; store[index] == emptySlot; ++index) ; // FIXME: we could just return something that // only knows the index. That would be cleaner. return new AbstractMap.BasicMapEntry<K, V>(enumClass.getEnumConstants()[index], store[index]) { pub...
protected void doResolveMember(AbstractVmClassLoader clc) {
protected void doResolveMember(VmClassLoader clc) {
protected void doResolveMember(AbstractVmClassLoader clc) { VmType vmClass = getConstClass().getResolvedVmClass(); vmResolvedField = vmClass.getField(getName()); if (vmResolvedField == null) { throw new NoSuchFieldError(toString() + " in class " + getClassName()); } }
bw.write("\"/>");
bw.write("\">");
private void writeRoot() throws BackingStoreException, IOException { bw.write(" <root type=\""); if (prefs.isUserNode()) { bw.write("user"); } else { bw.write("system"); } bw.write("\"/>"); writeRootMap(); writeNode(); bw.write(" </root...
JNodeToolkit tk = (JNodeToolkit) JNodeToolkit.getDefaultToolkit();
RawJNodeToolkit tk = (RawJNodeToolkit) RawJNodeToolkit.getDefaultToolkit();
private void postEvent(int id, long time, int modifiers, int keyCode, char keyChar) { JNodeToolkit tk = (JNodeToolkit) JNodeToolkit.getDefaultToolkit(); Component source = tk.getFocusHandler().getFocusedComponent(); if (source == null) source = tk.getTop(); KeyEvent me = new KeyEvent(sou...
protected boolean removeEldestEntry(Map.Entry eldest) {
protected synchronized boolean removeEldestEntry(Map.Entry eldest) { log.debug("BlockCache size: "+size());
protected boolean removeEldestEntry(Map.Entry eldest) { if(size()>MAX_SIZE) { try{ ((Block)eldest.getValue()).flush(); //notify the listeners CacheEvent event = new CacheEvent(eldest.getValue(),CacheEvent.REMOVED); Iterator listeners=cacheListeners.iterator(); while(listeners.hasNext()) { ((Cache...
if (! isSet[DAY_OF_WEEK]) fields[DAY_OF_WEEK] = getFirstDayOfWeek();
public void set(int field, int value) { if (isTimeSet) for (int i = 0; i < FIELD_COUNT; i++) isSet[i] = false; isTimeSet = false; fields[field] = value; isSet[field] = true; // The five valid date patterns, in order of priority // 1 YEAR + MONTH + DAY_OF_MONTH // 2 YEAR + MONTH + WEEK_OF_MONTH ...
cal.set(Calendar.HOUR, dosTime >> 11);
cal.set(Calendar.HOUR_OF_DAY, dosTime >> 11);
public static long decodeDateTime(int dosDate, int dosTime) { Calendar cal = Calendar.getInstance(); cal.set(Calendar.SECOND, (dosTime & 0x1f) * 2); cal.set(Calendar.MINUTE, (dosTime >> 5) & 0x3f); cal.set(Calendar.HOUR, dosTime >> 11); cal.set(Calendar.DATE, dosDate & 0x1f); cal.set(Calendar.MONTH, (dosDate...