Package avian

Examples of avian.Cell


  public String toString() {
    return avian.Data.toString(this);
  }

  public boolean add(T value) {
    PersistentSet.Path<Cell<T>> p = set.find(new Cell(value, null));
    if (p.fresh()) {
      set = p.add();
      return true;
    }
    return false;
View Full Code Here


    }
    return false;
  }

  T addAndReplace(T value) {
    PersistentSet.Path<Cell<T>> p = set.find(new Cell(value, null));
    if (p.fresh()) {
      set = p.add();
      return null;
    } else {
      T old = p.value().value;
      set = p.replaceWith(new Cell(value, null));
      return old;
    }
  }
View Full Code Here

      return old;
    }
  }
   
  T find(T value) {
    PersistentSet.Path<Cell<T>> p = set.find(new Cell(value, null));
    return p.fresh() ? null : p.value().value;
  }
View Full Code Here

    Cell<T> cell = removeCell(value);
    return cell == null ? null : cell.value;
  }

  private Cell<T> removeCell(Object value) {
    PersistentSet.Path<Cell<T>> p = set.find(new Cell(value, null));
    if (p.fresh()) {
      return null;
    } else {
      Cell<T> old = p.value();
View Full Code Here

  public boolean isEmpty() {
    return set.size() == 0;
  }

  public boolean contains(Object value) {
    return !set.find(new Cell(value, null)).fresh();
  }
View Full Code Here

  public ThreadGroup(ThreadGroup parent, String name) {
    this.parent = parent;
    this.name = name;

    synchronized (parent) {
      parent.subgroups = new Cell(this, subgroups);
    }
  }
View Full Code Here

TOP

Related Classes of avian.Cell

Copyright © 2018 www.massapicom. 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.