jfxrt

ramCollection, boolean paramBoolean)
    {
      boolean bool = false;
      Iterator localIterator = backingMap.entrySet().iterator();
      while (localIterator.hasNext())
      {
        Map.Entry localEntry = (Map.Entry)localIterator.next();
        if (paramBoolean == paramCollection.contains(localEntry.getValue()))
        {
          bool = true;
          Object localObject1 = localEntry.getKey();
          Object localObject2 = localEntry.getValue();
          localIterator.remove();
          callObservers(new ObservableMapWrapper.SimpleChange(ObservableMapWrapper.this, localObject1, localObject2, null));
        }
      }
      return bool;
    }
    
    public boolean retainAll(Collection<?> paramCollection)
    {
      return removeRetain(paramCollection, false);
    }
    
    public void clear()
    {
      ObservableMapWrapper.this.clear();
    }
    
    public String toString()
    {
      return backingMap.values().toString();
    }
    
    public boolean equals(Object paramObject)
    {
      return backingMap.values().equals(paramObject);
    }
    
    public int hashCode()
    {
      return backingMap.values().hashCode();
    }
  }
  
  private class SimpleChange
    extends MapChangeListener.Change<K, V>
  {
    private final K key;
    private final V old;
    private final V added;
    
    public SimpleChange(V paramV1, V paramV2)
    {
      super();
      key = paramV1;
      old = paramV2;
      Object localObject;
      added = localObject;
    }
    
    public boolean wasAdded()
    {
      return added != null;
    }
    
    public boolean wasRemoved()
    {
      return old != null;
    }
    
    public K getKey()
    {
      return (K)key;
    }
    
    public V getValueAdded()
    {
      return (V)added;
    }
    
    public V getValueRemoved()
    {
      return (V)old;
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.collections.ObservableMapWrapper
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.collections;

import java.util.Iterator;
import java.util.Set;

class ObservableSetWrapper$1
  implements Iterator<E>
{
  private final Iterator<E> backingIt = ObservableSetWrapper.access$000(this$0).iterator();
  private E lastElement;
  
  ObservableSetWrapper$1(ObservableSetWrapper paramObservableSetWrapper) {}
  
  public boolean hasNext()
  {
    return backingIt.hasNext();
  }
  
  public E next()
  {
    lastElement = backingIt.next();
    return (E)lastElement;
  }
  
  public void remove()
  {
    backingIt.remove();
    ObservableSetWrapper.access$100(this$0, new ObservableSetWrapper.SimpleChange(this$0, lastElement, null));
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.collections.ObservableSetWrapper.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.collections;

import javafx.collections.SetChangeListener.Change;

class ObservableSetWrapper$SimpleChange
  extends SetChangeListener.Change<E>
{
  private E old;
  private E added;
  
  public ObservableSetWrapper$SimpleChange(E paramE1, E paramE2)
  {
    super(paramE1);
    old = paramE2;
    Object localObject;
    added = localObject;
  }
  
  public boolean wasAdded()
  {
    return added != null;
  }
  
  public boolean wasRemoved()
  {
    return old != null;
  }
  
  public E getElementAdded()
  {
    return (E)added;
  }
  
  public E getElementRemoved()
  {
    return (E)old;
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.collections.ObservableSetWrapper.SimpleChange
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.collections;

import java.util.Collection;
import java.util.Iterator;
import java.util.Set;
import javafx.beans.InvalidationListener;
import javafx.collections.ObservableSet;
import javafx.collections.SetChangeListener;
import javafx.collections.SetChangeListener.Change;

public class ObservableSetWrapper<E>
  implements ObservableSet<E>
{
  private final Set<E> backingSet;
  private SetListenerHelper<E> listenerHelper;
  
  public ObservableSetWrapper(Set<E> paramSet)
  {
    backingSet = paramSet;
  }
  
  private void callObservers(SetChangeListener.Change<E> paramChange)
  {
    SetListenerHelper.fireValueChangedEvent(listenerHelper, paramChange);
  }
  
  public void addListener(InvalidationListener paramInvalidationListener)
  {
    listenerHelper = SetListenerHelper.addListener(listenerHelper, paramInvalidationListener);
  }
  
  public void removeListener(InvalidationListener paramInvalidationListener)
  {
    listenerHelper = SetListenerHelper.removeListener(listenerHelper, paramInvalidationListener);
  }
  
  public void addListener(SetChangeListener<? super E> paramSetChangeListener)
  {
    listenerHelper = SetListenerHelper.addListener(listenerHelper, paramSetChangeListener);
  }
  
  public void removeListener(SetChangeListener<? super E> paramSetChangeListener)
  {
    listenerHelper = SetListenerHelper.removeListener(listenerHelper, paramSetChangeListener);
  }
  
  public int size()
  {
    return backingSet.size();
  }
  
  public boolean isEmpty()
  {
    return backingSet.isEmpty();
  }
  
  public boolean contains(Object paramObject)
  {
    return backingSet.contains(paramObject);
  }
  
  public Iterator iterator()
  {
    new Iterator()
    {
      private final Iterator<E> backingIt = backingSet.iterator();
      private E lastElement;
      
      public boolean hasNext()
      {
        return backingIt.hasNext();
      }
      
      public E next()
      {
        lastElement = backingIt.next();
        return (E)lastElement;
      }
      
      public void remove()
      {
        backingIt.remove();
        ObservableSetWrapper.this.callObservers(new ObservableSetWrapper.SimpleChange(ObservableSetWrapper.this, lastElement, null));
      }
    };
  }
  
  public Object[] toArray()
  {
    return backingSet.toArray();
  }
  
  public <T> T[] toArray(T[] paramArrayOfT)
  {
    return backingSet.toArray(paramArrayOfT);
  }
  
  public boolean add(E paramE)
  {
    boolean bool = backingSet.add(paramE);
    if (bool) {
      callObservers(new SimpleChange(null, paramE));
    }
    return bool;
  }
  
  public boolean remove(Object paramObject)
  {
    boolean bool = backingSet.remove(paramObject);
    if (bool) {
      callObservers(new SimpleChange(paramObject, null));
    }
    return bool;
  }
  
  public boolean containsAll(Collection<?> paramCollection)
  {
    return backingSet.containsAll(paramCollection);
  }
  
  public boolean addAll(Collection<? extends E> paramCollection)
  {
    boolean bool = false;
    Iterator localIterator = paramCollection.iterator();
    while (localIterator.hasNext())
    {
      Object localObject = localIterator.next();
      bool |= add(localObject);
    }
    return bool;
  }
  
  public boolean retainAll(Collection<?> paramCollection)
  {
    return removeRetain(paramCollection, false);
  }
  
  public boolean removeAll(Collection<?> paramCollection)
  {
    return removeRetain(paramCollection, true);
  }
  
  private boolean removeRetain(Collection<?> paramCollection, boolean paramBoolean)
  {
    boolean bool = false;
    Iterator localIterator = backingSet.iterator();
    while (localIterator.hasNext())
    {
      Object localObject = localIterator.next();
      if (paramBoolean == paramCollection.contains(localObject))
      {
        bool = true;
        localIterator.remove();
        callObservers(new SimpleChange(localObject, null));
      }
    }
    return bool;
  }
  
  public void clear()
  {
    Iterator localIterator = backingSet.iterator();
    while (localIterator.hasNext())
    {
      Object localObject = localIterator.next();
      localIterator.remove();
      callObservers(new SimpleChange(localObject, null));
    }
  }
  
  public String toString()
  {
    return backingSet.toString();
  }
  
  public boolean equals(Object paramObject)
  {
    return backingSet.equals(paramObject);
  }
  
  public int hashCode()
  {
    return backingSet.hashCode();
  }
  
  private class SimpleChange
    extends SetChangeListener.Change<E>
  {
    private E old;
    private E added;
    
    public SimpleChange(E paramE)
    {
      super();
      old = paramE;
      Object localObject;
      added = localObject;
    }
    
    public boolean wasAdded()
    {
      return added != null;
    }
    
    public boolean wasRemoved()
    {
      return old != null;
    }
    
    public E getElementAdded()
    {
      return (E)added;
    }
    
    public E getElementRemoved()
    {
      return (E)old;
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.collections.ObservableSetWrapper
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.collections;

class SetListenerHelper$1 {}

/* Location:
 * Qualified Name:     com.sun.javafx.collections.SetListenerHelper.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.collections;

import java.util.Arrays;
import javafx.beans.InvalidationListener;
import javafx.collections.SetChangeListener;
import javafx.collections.SetChangeListener.Change;

class SetListenerHelper$Generic<E>
  extends SetListenerHelper<E>
{
  private InvalidationListener[] invalidationListeners;
  private SetChangeListener<? super E>[] changeListeners;
  private int invalidationSize;
  private int changeSize;
  private boolean locked;
  
  private SetListenerHelper$Generic(InvalidationListener paramInvalidationListener1, InvalidationListener paramInvalidationListener2)
  {
    invalidationListeners = new InvalidationListener[] { paramInvalidationListener1, paramInvalidationListener2 };
    invalidationSize = 2;
  }
  
  private SetListenerHelper$Generic(SetChangeListener<? super E> paramSetChangeListener1, SetChangeListener<? super E> paramSetChangeListener2)
  {
    changeListeners = new SetChangeListener[] { paramSetChangeListener1, paramSetChangeListener2 };
    changeSize = 2;
  }
  
  private SetListenerHelper$Generic(InvalidationListener paramInvalidationListener, SetChangeListener<? super E> paramSetChangeListener)
  {
    invalidationListeners = new InvalidationListener[] { paramInvalidationListener };
    invalidationSize = 1;
    changeListeners = new SetChangeListener[] { paramSetChangeListener };
    changeSize = 1;
  }
  
  protected Generic<E> addListener(InvalidationListener paramInvalidationListener)
  {
    if (invalidationListeners == null)
    {
      invalidationListeners = new InvalidationListener[] { paramInvalidationListener };
      invalidationSize = 1;
    }
    else
    {
      int i = invalidationListeners.length;
      int j;
      if (locked)
      {
        j = invalidationSize < i ? i : i * 3 / 2 + 1;
        invalidationListeners = ((InvalidationListener[])Arrays.copyOf(invalidationListeners, j));
      }
      else if (invalidationSize == i)
      {
        invalidationSize = trim(invalidationSize, invalidationListeners);
        if (invalidationSize == i)
        {
          j = i * 3 / 2 + 1;
          invalidationListeners = ((InvalidationListener[])Arrays.copyOf(invalidationListeners, j));
        }
      }
      invalidationListeners[(invalidationSize++)] = paramInvalidationListener;
    }
    return this;
  }
  
  protected SetListenerHelper<E> removeListener(InvalidationListener paramInvalidationListener)
  {
    if (invalidationListeners != null) {
      for (int i = 0; i < invalidationSize; i++) {
        if (paramInvalidationListener.equals(invalidationListeners[i]))
        {
          if (invalidationSize == 1)
          {
            if (changeSize == 1) {
              return new SetListenerHelper.SingleChange(changeListeners[0], null);
            }
            invalidationListeners = null;
            invalidationSize = 0;
            break;
          }
          if ((invalidationSize == 2) && (changeSize == 0)) {
            return new SetListenerHelper.SingleInvalidation(invalidationListeners[(1 - i)], null);
          }
          int j = invalidationSize - i - 1;
          InvalidationListener[] arrayOfInvalidationListener = invalidationListeners;
          if (locked)
          {
            invalidationListeners = new InvalidationListener[invalidationListeners.length];
            System.arraycopy(arrayOfInvalidationListener, 0, invalidationListeners, 0, i + 1);
          }
          if (j > 0) {
            System.arraycopy(arrayOfInvalidationListener, i + 1, invalidationListeners, i, j);
          }
          invalidationSize -= 1;
          if (!locked) {
            invalidationListeners[invalidationSize] = null;
          }
          break;
        }
      }
    }
    return this;
  }
  
  protected SetListenerHelper<E> addListener(SetChangeListener<? super E> paramSetChangeListener)
  {
    if (changeListeners == null)
    {
      changeListeners = new SetChangeListener[] { paramSetChangeListener };
      changeSize = 1;
    }
    else
    {
      int i = changeListeners.length;
      int j;
      if (locked)
      {
        j = changeSize < i ? i : i * 3 / 2 + 1;
        changeListeners = ((SetChangeListener[])Arrays.copyOf(changeListeners, j));
      }
      else if (changeSize == i)
      {
        changeSize = trim(changeSize, changeListeners);
        if (changeSize == i)
        {
          j = i * 3 / 2 + 1;
          changeListeners = ((SetChangeListener[])Arrays.copyOf(changeListeners, j));
        }
      }
      changeListeners[(changeSize++)] = paramSetChangeListener;
    }
    return this;
  }
  
  protected SetListenerHelper<E> removeListener(SetChangeListener<? super E> paramSetChangeListener)
  {
    if (changeListeners != null) {
      for (int i = 0; i < changeSize; i++) {
        if (paramSetChangeListener.equals(changeListeners[i]))
        {
          if (changeSize == 1)
          {
            if (invalidationSize == 1) {
              return new SetListenerHelper.SingleInvalidation(invalidationListeners[0], null);
            }
            changeListeners = null;
            changeSize = 0;
            break;
          }
          if ((changeSize == 2) && (invalidationSize == 0)) {
            return new SetListenerHelper.SingleChange(changeListeners[(1 - i)], null);
          }
          int j = changeSize - i - 1;
          SetChangeListener[] arrayOfSetChangeListener = changeListeners;
          if (locked)
          {
            changeListeners = new SetChangeListener[changeListeners.length];
            System.arraycopy(arrayOfSetChangeListener, 0, changeListeners, 0, i + 1);
          }
          if (j > 0) {
            System.arraycopy(arrayOfSetChangeListener, i + 1, changeListeners, i, j);
          }
          changeSize -= 1;
          if (!locked) {
            changeListeners[changeSize] = null;
          }
          break;
        }
      }
    }
    return this;
  }
  
  protected void fireValueChangedEvent(SetChangeListener.Change<E> paramChange)
  {
    InvalidationListener[] arrayOfInvalidationListener = invalidationListeners;
    int i = invalidationSize;
    SetChangeListener[] arrayOfSetChangeListener = changeListeners;
    int j = changeSize;
    try
    {
      locked = true;
      for (int k = 0; k < i; k++) {
        arrayOfInvalidationListener[k].invalidated(paramChange.getSet());
      }
      for (k = 0; k < j; k++) {
        arrayOfSetChangeListener[k].onChanged(paramChange);
      }
    }
    finally
    {
      locked = false;
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.collections.SetListenerHelper.Generic
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.collections;

import javafx.beans.InvalidationListener;
import javafx.collections.SetChangeListener;
import javafx.collections.SetChangeListener.Change;

class SetListenerHelper$SingleChange<E>
  extends SetListenerHelper<E>
{
  private final SetChangeListener<? super E> listener;
  
  private SetListenerHelper$SingleChange(SetChangeListener<? super E> paramSetChangeListener)
  {
    listener = paramSetChangeListener;
  }
  
  protected SetListenerHelper<E> addListener(InvalidationListener paramInvalidationListener)
  {
    return new SetListenerHelper.Generic(paramInvalidationListener, listener, null);
  }
  
  protected SetListenerHelper<E> removeListener(InvalidationListener paramInvalidationListener)
  {
    return this;
  }
  
  protected SetListenerHelper<E> addListener(SetChangeListener<? super E> paramSetChangeListener)
  {
    return new SetListenerHelper.Generic(listener, paramSetChangeListener, null);
  }
  
  protected SetListenerHelper<E> removeListener(SetChangeListener<? super E> paramSetChangeListener)
  {
    return paramSetChangeListener.equals(listener) ? null : this;
  }
  
  protected void fireValueChangedEvent(SetChangeListener.Change<E> paramChange)
  {
    listener.onChanged(paramChange);
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.collections.SetListenerHelper.SingleChange
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.collections;

import javafx.beans.InvalidationListener;
import javafx.collections.SetChangeListener;
import javafx.collections.SetChangeListener.Change;

class SetListenerHelper$SingleInvalidation<E>
  extends SetListenerHelper<E>
{
  private final InvalidationListener listener;
  
  private SetListenerHelper$SingleInvalidation(InvalidationListener paramInvalidationListener)
  {
    listener = paramInvalidationListener;
  }
  
  protected SetListenerHelper<E> addListener(InvalidationListener paramInvalidationListener)
  {
    return new SetListenerHelper.Generic(listener, paramInvalidationListener, null);
  }
  
  protected SetListenerHelper<E> removeListener(InvalidationListener paramInvalidationListener)
  {
    return paramInvalidationListener.equals(listener) ? null : this;
  }
  
  protected SetListenerHelper<E> addListener(SetChangeListener<? super E> paramSetChangeListener)
  {
    return new SetListenerHelper.Generic(listener, paramSetChangeListener, null);
  }
  
  protected SetListenerHelper<E> removeListener(SetChangeListener<? super E> paramSetChangeListener)
  {
    return this;
  }
  
  protected void fireValueChangedEvent(SetChangeListener.Change<E> paramChange)
  {
    listener.invalidated(paramChange.getSet());
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.collections.SetListenerHelper.SingleInvalidation
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.collections;

import com.sun.javafx.binding.ExpressionHelperBase;
import java.util.Arrays;
import javafx.beans.InvalidationListener;
import javafx.collections.SetChangeListener;
import javafx.collections.SetChangeListener.Change;

public abstract class SetListenerHelper<E>
  extends ExpressionHelperBase
{
  public static <E> SetListenerHelper<E> addListener(SetListenerHelper<E> paramSetListenerHelper, InvalidationListener paramInvalidationListener)
  {
    if (paramInvalidationListener == null) {
      throw new NullPointerException();
    }
    return paramSetListenerHelper == null ? new SingleInvalidation(paramInvalidationListener, null) : paramSetListenerHelper.addListener(paramInvalidationListener);
  }
  
  public static <E> SetListenerHelper<E> removeListener(SetListenerHelper<E> paramSetListenerHelper, InvalidationListener paramInvalidationListener)
  {
    if (paramInvalidationListener == null) {
      throw new NullPointerException();
    }
    return paramSetListenerHelper == null ? null : paramSetListenerHelper.removeListener(paramInvalidationListener);
  }
  
  public static <E> SetListenerHelper<E> addListener(SetListenerHelper<E> paramSetListenerHelper, SetChangeListener<? super E> paramSetChangeListener)
  {
    if (paramSetChangeListener == null) {
      throw new NullPointerException();
    }
    return paramSetListenerHelper == null ? new SingleChange(paramSetChangeListener, null) : paramSetListenerHelper.addListener(paramSetChangeListener);
  }
  
  public static <E> SetListenerHelper<E> removeListener(SetListenerHelper<E> paramSetListenerHelper, SetChangeListener<? super E> paramSetChangeListener)
  {
    if (paramSetChangeListener == null) {
      throw new NullPointerException();
    }
    return paramSetListenerHelper == null ? null : paramSetListenerHelper.removeListener(paramSetChangeListener);
  }
  
  public static <E> void fireValueChangedEvent(SetListenerHelper<E> paramSetListenerHelper, SetChangeListener.Change<E> paramChange)
  {
    if (paramSetListenerHelper != null) {
      paramSetListenerHelper.fireValueChangedEvent(paramChange);
    }
  }
  
  public static <E> boolean hasListeners(SetListenerHelper<E> paramSetListenerHelper)
  {
    return paramSetListenerHelper != null;
  }
  
  protected abstract SetListenerHelper<E> addListener(InvalidationListener paramInvalidationListener);
  
  protected abstract SetListenerHelper<E> removeListener(InvalidationListener paramInvalidationListener);
  
  protected abstract SetListenerHelper<E> addListener(SetChangeListener<? super E> paramSetChangeListener);
  
  protected abstract SetListenerHelper<E> removeListener(SetChangeListener<? super E> paramSetChangeListener);
  
  protected abstract void fireValueChangedEvent(SetChangeListener.Change<E> paramChange);
  
  private static class Generic<E>
    extends SetListenerHelper<E>
  {
    private InvalidationListener[] invalidationListeners;
    private SetChangeListener<? super E>[] changeListeners;
    private int invalidationSize;
    private int changeSize;
    private boolean locked;
    
    private Generic(InvalidationListener paramInvalidationListener1, InvalidationListener paramInvalidationListener2)
    {
      invalidationListeners = new InvalidationListener[] { paramInvalidationListener1, paramInvalidationListener2 };
      invalidationSize = 2;
    }
    
    private Generic(SetChangeListener<? super E> paramSetChangeListener1, SetChangeListener<? super E> paramSetChangeListener2)
    {
      changeListeners = new SetChangeListener[] { paramSetChangeListener1, paramSetChangeListener2 };
      changeSize = 2;
    }
    
    private Generic(InvalidationListener paramInvalidationListener, SetChangeListener<? super E> paramSetChangeListener)
    {
      invalidationListeners = new InvalidationListener[] { paramInvalidationListener };
      invalidationSize = 1;
      changeListeners = new SetChangeListener[] { paramSetChangeListener };
      changeSize = 1;
    }
    
    protected Generic<E> addListener(InvalidationListener paramInvalidationListener)
    {
      if (invalidationListeners == null)
      {
        invalidationListeners = new InvalidationListener[] { paramInvalidationListener };
        invalidationSize = 1;
      }
      else
      {
        int i = invalidationListeners.length;
        int j;
        if (locked)
        {
          j = invalidationSize < i ? i : i * 3 / 2 + 1;
          invalidationListeners = ((InvalidationListener[])Arrays.copyOf(invalidationListeners, j));
        }
        else if (invalidationSize == i)
        {
          invalidationSize = trim(invalidationSize, invalidationListeners);
          if (invalidationSize == i)
          {
            j = i * 3 / 2 + 1;
            invalidationListeners = ((InvalidationListener[])Arrays.copyOf(invalidationListeners, j));
          }
        }
        invalidationListeners[(invalidationSize++)] = paramInvalidationListener;
      }
      return this;
    }
    
    protected SetListenerHelper<E> removeListener(InvalidationListener paramInvalidationListener)
    {
      if (invalidationListeners != null) {
        for (int i = 0; i < invalidationSize; i++) {
          if (paramInvalidationListener.equals(invalidationListeners[i]))
          {
            if (invalidationSize == 1)
            {
              if (changeSize == 1) {
                return new SetListenerHelper.SingleChange(changeListeners[0], null);
              }
              invalidationListeners = null;
              invalidationSize = 0;
              break;
            }
            if ((invalidationSize == 2) && (changeSize == 0)) {
              return new SetListenerHelper.SingleInvalidation(invalidationListeners[(1 - i)], null);
            }
            int j = invalidationSize - i - 1;
            InvalidationListener[] arrayOfInvalidationListener = invalidationListeners;
            if (locked)
            {
              invalidationListeners = new InvalidationListener[invalidationListeners.length];
              System.arraycopy(arrayOfInvalidationListener, 0, invalidationListeners, 0, i + 1);
            }
            if (j > 0) {
              System.arraycopy(arrayOfInvalidationListener, i + 1, invalidationListeners, i, j);
            }
            invalidationSize -= 1;
            if (!locked) {
              invalidationListeners[invalidationSize] = null;
            }
            break;
          }
        }
      }
      return this;
    }
    
    protected SetListenerHelper<E> addListener(SetChangeListener<? super E> paramSetChangeListener)
    {
      if (changeListeners == null)
      {
        changeListeners = new SetChangeListener[] { paramSetChangeListener };
        changeSize = 1;
      }
      else
      {
        int i = changeListeners.length;
        int j;
        if (locked)
        {
          j = changeSize < i ? i : i * 3 / 2 + 1;
          changeListeners = ((SetChangeListener[])Arrays.copyOf(changeListeners, j));
        }
        else if (changeSize == i)
        {
          changeSize = trim(changeSize, changeListeners);
          if (changeSize == i)
          {
            j = i * 3 / 2 + 1;
            changeListeners = ((SetChangeListener[])Arrays.copyOf(changeListeners, j));
          }
        }
        changeListeners[(changeSize++)] = paramSetChangeListener;
      }
      return this;
    }
    
    protected SetListenerHelper<E> removeListener(SetChangeListener<? super E> paramSetChangeListener)
    {
      if (changeListeners != null) {
        for (int i = 0; i < changeSize; i++) {
          if (paramSetChangeListener.equals(changeListeners[i]))
          {
            if (changeSize == 1)
            {
              if (invalidationSize == 1) {
                return new SetListenerHelper.SingleInvalidation(invalidationListeners[0], null);
              }
              changeListeners = null;
              changeSize = 0;
              break;
            }
            if ((changeSize == 2) && (invalidationSize == 0)) {
              return new SetListenerHelper.SingleChange(changeListeners[(1 - i)], null);
            }
            int j = changeSize - i - 1;
            SetChangeListener[] arrayOfSetChangeListener = changeListeners;
            if (locked)
            {
              changeListeners = new SetChangeListener[changeListeners.length];
              System.arraycopy(arrayOfSetChangeListener, 0, changeListeners, 0, i + 1);
            }
            if (j > 0) {
              System.arraycopy(arrayOfSetChangeListener, i + 1, changeListeners, i, j);
            }
            changeSize -= 1;
            if (!locked) {
              changeListeners[changeSize] = null;
            }
            break;
          }
        }
      }
      return this;
    }
    
    protected void fireValueChangedEvent(SetChangeListener.Change<E> paramChange)
    {
      InvalidationListener[] arrayOfInvalidationListener = invalidationListeners;
      int i = invalidationSize;
      SetChangeListener[] arrayOfSetChangeListener = changeListeners;
      int j = changeSize;
      try
      {
        locked = true;
        for (int k = 0; k < i; k++) {
          arrayOfInvalidationListener[k].invalidated(paramChange.getSet());
        }
        for (k = 0; k < j; k++) {
          arrayOfSetChangeListener[k].onChanged(paramChange);
        }
      }
      finally
      {
        locked = false;
      }
    }
  }
  
  private static class SingleChange<E>
    extends SetListenerHelper<E>
  {
    private final SetChangeListener<? super E> listener;
    
    private SingleChange(SetChangeListener<? super E> paramSetChangeListener)
    {
      listener = paramSetChangeListener;
    }
    
    protected SetListenerHelper<E> addListener(InvalidationListener paramInvalidationListener)
    {
      return new SetListenerHelper.Generic(paramInvalidationListener, listener, null);
    }
    
    protected SetListenerHelper<E> removeListener(InvalidationListener paramInvalidationListener)
    {
      return this;
    }
    
    protected SetListenerHelper<E> addListener(SetChangeListener<? super E> paramSetChangeListener)
    {
      return new SetListenerHelper.Generic(listener, paramSetChangeListener, null);
    }
    
    protected SetListenerHelper<E> removeListener(SetChangeListener<? super E> paramSetChangeListener)
    {
      return paramSetChangeListener.equals(listener) ? null : this;
    }
    
    protected void fireValueChangedEvent(SetChangeListener.Change<E> paramChange)
    {
      listener.onChanged(paramChange);
    }
  }
  
  private static class SingleInvalidation<E>
    extends SetListenerHelper<E>
  {
    private final InvalidationListener listener;
    
    private SingleInvalidation(InvalidationListener paramInvalidationListener)
    {
      listener = paramInvalidationListener;
    }
    
    protected SetListenerHelper<E> addListener(InvalidationListener paramInvalidationListener)
    {
      return new SetListenerHelper.Generic(listener, paramInvalidationListener, null);
    }
    
    protected SetListenerHelper<E> removeListener(InvalidationListener paramInvalidationListener)
    {
      return paramInvalidationListener.equals(listener) ? null : this;
    }
    
    protected SetListenerHelper<E> addListener(SetChangeListener<? super E> paramSetChangeListener)
    {
      return new SetListenerHelper.Generic(listener, paramSetChangeListener, null);
    }
    
    protected SetListenerHelper<E> removeListener(SetChangeListener<? super E> paramSetChangeListener)
    {
      return this;
    }
    
    protected void fireValueChangedEvent(SetChangeListener.Change<E> paramChange)
    {
      listener.invalidated(paramChange.getSet());
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.collections.SetListenerHelper
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.collections;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.ListIterator;

public class SortHelper
{
  private int[] permutation;
  private int[] reversePermutation;
  private static final int INSERTIONSORT_THRESHOLD = 7;
  
  public <T extends Comparable<? super T>> int[] sort(List<T> paramList)
  {
    Comparable[] arrayOfComparable = (Comparable[])Array.newInstance(Comparable.class, paramList.size());
    try
    {
      arrayOfComparable = (Comparable[])paramList.toArray(arrayOfComparable);
    }
    catch (ArrayStoreException localArrayStoreException)
    {
      throw new ClassCastException();
    }
    int[] arrayOfInt = sort(arrayOfComparable);
    ListIterator localListIterator = paramList.listIterator();
    for (int i = 0; i < arrayOfComparable.length; i++)
    {
      localListIterator.next();
      localListIterator.set(arrayOfComparable[i]);
    }
    return arrayOfInt;
  }
  
  public <T> int[] sort(List<T> paramList, Comparator<? super T> paramComparator)
  {
    Object[] arrayOfObject = paramList.toArray();
    int[] arrayOfInt = sort(arrayOfObject, paramComparator);
    ListIterator localListIterator = paramList.listIterator();
    for (int i = 0; i < arrayOfObject.length; i++)
    {
      localListIterator.next();
      localListIterator.set(arrayOfObject[i]);
    }
    return arrayOfInt;
  }
  
  public <T extends Comparable<? super T>> int[] sort(T[] paramArrayOfT)
  {
    return sort(paramArrayOfT, null);
  }
  
  public <T> int[] sort(T[] paramArrayOfT, Comparator<? super T> paramComparator)
  {
    Object[] arrayOfObject = (Object[])paramArrayOfT.clone();
    int[] arrayOfInt = initPermutation(paramArrayOfT.length);
    if (paramComparator == null) {
      mergeSort(arrayOfObject, paramArrayOfT, 0, paramArrayOfT.length, 0);
    } else {
      mergeSort(arrayOfObject, paramArrayOfT, 0, paramArrayOfT.length, 0, paramComparator);
    }
    reversePermutation = null;
    permutation = null;
    return arrayOfInt;
  }
  
  public <T> int[] sort(T[] paramArrayOfT, int paramInt1, int paramInt2, Comparator<? super T> paramComparator)
  {
    rangeCheck(paramArrayOfT.length, paramInt1, paramInt2);
    Object[] arrayOfObject = (Object[])copyOfRange(paramArrayOfT, paramInt1, paramInt2);
    int[] arrayOfInt = initPermutation(paramArrayOfT.length);
    if (paramComparator == null) {
      mergeSort(arrayOfObject, paramArrayOfT, paramInt1, paramInt2, -paramInt1);
    } else {
      mergeSort(arrayOfObject, paramArrayOfT, paramInt1, paramInt2, -paramInt1, paramComparator);
    }
    reversePermutation = null;
    permutation = null;
    return Arrays.copyOfRange(arrayOfInt, paramInt1, paramInt2);
  }
  
  private static void rangeCheck(int paramInt1, int paramInt2, int paramInt3)
  {
    if (paramInt2 > paramInt3) {
      throw new IllegalArgumentException("fromIndex(" + paramInt2 + ") > toIndex(" + paramInt3 + ")");
    }
    if (paramInt2 < 0) {
      throw new ArrayIndexOutOfBoundsException(paramInt2);
    }
    if (paramInt3 > paramInt1) {
      throw new ArrayIndexOutOfBoundsException(paramInt3);
    }
  }
  
  public static <T> T[] copyOfRange(T[] paramArrayOfT, int paramInt1, int paramInt2)
  {
    return copyOfRange(paramArrayOfT, paramInt1, paramInt2, paramArrayOfT.getClass());
  }
  
  public static <T, U> T[] copyOfRange(U[] paramArrayOfU, int paramInt1, int paramInt2, Class<? extends T[]> paramClass)
  {
    int i = paramInt2 - paramInt1;
    if (i < 0) {
      throw new IllegalArgumentException(paramInt1 + " > " + paramInt2);
    }
    Object[] arrayOfObject = paramClass == Object[].class ? (Object[])new Object[i] : (Object[])Array.newInstance(paramClass.getComponentType(), i);
    System.arraycopy(paramArrayOfU, paramInt1, arrayOfObject, 0, Math.min(paramArrayOfU.length - paramInt1, i));
    return arrayOfObject;
  }
  
  private void mergeSort(Object[] paramArrayOfObject1, Object[] paramArrayOfObject2, int paramInt1, int paramInt2, int paramInt3)
  {
    int i = paramInt2 - paramInt1;
    if (i < 7)
    {
      for (j = paramInt1; j < paramInt2; j++) {
        for (k = j; (k > paramInt1) && (((Comparable)paramArrayOfObject2[(k - 1)]).compareTo(paramArrayOfObject2[k]) > 0); k--) {
          swap(paramArrayOfObject2, k, k - 1);
        }
      }
      return;
    }
    int j = paramInt1;
    int k = paramInt2;
    paramInt1 += paramInt3;
    paramInt2 += paramInt3;
    int m = paramInt1 + paramInt2 >>> 1;
    mergeSort(paramArrayOfObject2, paramArrayOfObject1, paramInt1, m, -paramInt3);
    mergeSort(paramArrayOfObject2, paramArrayOfObject1, m, paramInt2, -paramInt3);
    if (((Comparable)paramArrayOfObject1[(m - 1)]).compareTo(paramArrayOfObject1[m]) <= 0)
    {
      System.arraycopy(paramArrayOfObject1, paramInt1, paramArrayOfObject2, j, i);
      return;
    }
    int n = j;
    int i1 = paramInt1;
    int i2 = m;
    while (n < k)
    {
      if ((i2 >= paramInt2) || ((i1 < m) && (((Comparable)paramArrayOfObject1[i1]).compareTo(paramArrayOfObject1[i2]) <= 0)))
      {
        paramArrayOfObject2[n] = paramArrayOfObject1[i1];
        permutation[reversePermutation[(i1++)]] = n;
      }
      else
      {
        paramArrayOfObject2[n] = paramArrayOfObject1[i2];
        permutation[reversePermutation[(i2++)]] = n;
      }
      n++;
    }
    for (n = j; n < k; n++) {
      reversePermutation[permutation[n]] = n;
    }
  }
  
  private void mergeSort(Object[] paramArrayOfObject1, Object[] paramArrayOfObject2, int paramInt1, int paramInt2, int paramInt3, Comparator paramComparator)
  {
    int i = paramInt2 - paramInt1;
    if (i < 7)
    {
      for (j = paramInt1; j < paramInt2; j++) {
        for (k = j; (k > paramInt1) && (paramComparator.compare(paramArrayOfObject2[(k - 1)], paramArrayOfObject2[k]) > 0); k--) {
          swap(paramArrayOfObject2, k, k - 1);
        }
      }
      return;
    }
    int j = paramInt1;
    int k = paramInt2;
    paramInt1 += paramInt3;
    paramInt2 += paramInt3;
    int m = paramInt1 + paramInt2 >>> 1;
    mergeSort(paramArrayOfObject2, paramArrayOfObject1, paramInt1, m, -paramInt3, paramComparator);
    mergeSort(paramArrayOfObject2, paramArrayOfObject1, m, paramInt2, -paramInt3, paramComparator);
    if (paramComparator.compare(paramArrayOfObject1[(m - 1)], paramArrayOfObject1[m]) <= 0)
    {
      System.arraycopy(paramArrayOfObject1, paramInt1, paramArrayOfObject2, j, i);
      return;
    }
    int n = j;
    int i1 = paramInt1;
    int i2 = m;
    while (n < k)
    {
      if ((i2 >= paramInt2) || ((i1 < m) && (paramComparator.compare(paramArrayOfObject1[i1], paramArrayOfObject1[i2]) <= 0)))
      {
        paramArrayOfObject2[n] = paramArrayOfObject1[i1];
        permutation[reversePermutation[(i1++)]] = n;
      }
      else
      {
        paramArrayOfObject2[n] = paramArrayOfObject1[i2];
        permutation[reversePermutation[(i2++)]] = n;
      }
      n++;
    }
    for (n = j; n < k; n++) {
      reversePermutation[permutation[n]] = n;
    }
  }
  
  private void swap(Object[] paramArrayOfObject, int paramInt1, int paramInt2)
  {
    Object localObject = paramArrayOfObject[paramInt1];
    paramArrayOfObject[paramInt1] = paramArrayOfObject[paramInt2];
    paramArrayOfObject[paramInt2] = localObject;
    permutation[reversePermutation[paramInt1]] = paramInt2;
    permutation[reversePermutation[paramInt2]] = paramInt1;
    int i = reversePermutation[paramInt1];
    reversePermutation[paramInt1] = reversePermutation[paramInt2];
    reversePermutation[paramInt2] = i;
  }
  
  private int[] initPermutation(int paramInt)
  {
    permutation = new int[paramInt];
    reversePermutation = new int[paramInt];
    for (int i = 0; i < paramInt; i++) {
      permutation[i] = (reversePermutation[i] = i);
    }
    return permutation;
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.collections.SortHelper
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.collections;

import java.util.Comparator;
import java.util.List;

public abstract interface SortableList<E>
  extends List<E>
{
  public abstract void sort();
  
  public abstract void sort(Comparator<? super E> paramComparator);
}

/* Location:
 * Qualified Name:     com.sun.javafx.collections.SortableList
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.collections;

import java.util.ArrayList;
import java.util.List;
import javafx.collections.ListChangeListener.Change;
import javafx.collections.ObservableList;

public abstract class TrackableObservableList<T>
  extends ObservableListWrapper<T>
  implements ObservableList<T>
{
  public TrackableObservableList(List<T> paramList)
  {
    super(paramList);
  }
  
  public TrackableObservableList()
  {
    super(new ArrayList());
  }
  
  protected abstract void onChanged(ListChangeListener.Change<T> paramChange);
  
  protected void callObservers(ListChangeListener.Change<T> paramChange)
  {
    onChanged(paramChange);
    super.callObservers(paramChange);
  }
  
  protected boolean hasObserver()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     com.sun.javafx.collections.TrackableObservableList
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javafx.collections;

import java.util.Iterator;

class UnmodifiableListSet$1
  implements Iterator<E>
{
  UnmodifiableListSet$1(UnmodifiableListSet paramUnmodifiableListSet, Iterator paramIterator) {}
  
  public boolean hasNext()
  {
    return val$itr.hasNext();
  }
  
  public E next()
  {
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd