`
liuzhaomin
  • 浏览: 198745 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论
文章列表
TreeSet基于TreeMap实现,支持排序; TreeSet是非线程安全的;   public class TreeSet<E> extends AbstractSet<E> implements NavigableSet<E>, Cloneable, java.io.Serializable { /** * The backing map. */ private transient NavigableMap<E,Object> m; // Dummy value to ...
Set和List最明显的区别在于Set不允许元素重复,而List允许。 Set为了做到不允许元素重复,采用的是基于HashMap来实现。 HashSet是非线程安全的。   public class HashSet<E> extends AbstractSet<E> implements Set<E>, Cloneable, java.io.Serializable { static final long serialVersionUID = -5024744406713321676L; private t ...
Stack基于Vector实现,支持LIFO。实际上栈是一种抽象数据类型。   public class Stack<E> extends Vector<E> { /** * Creates an empty Stack. */ public Stack() { } /** * Pushes an item onto the top of this stack. This has exactly * the same effect as: * <blockq ...
  public class Vector<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, java.io.Serializable { /** * The array buffer into which the components of the vector are * stored. The capacity of the vector is the length of this array buffe ...
  /** * All of the operations perform as could be expected for a doubly-linked * list. Operations that index into the list will traverse the list from * the beginning or the end, whichever is closer to the specified index.<p> * * <p><strong>Note that this implementation i ...
/** * The number of times this list has been <i>structurally modified</i>. * Structural modifications are those that change the size of the * list, or otherwise perturb it in such a fashion that iterations in * progress may yield incorrect results. * * ...
/** * Returns an iterator over the elements in this list in proper sequence. * * <p>This implementation returns a straightforward implementation of the * iterator interface, relying on the backing list's {@code size()}, * {@code get(int)}, and {@code remove(int)} ...
public class ArrayList<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, java.io.Serializable { private static final long serialVersionUID = 8683452581122892189L; /** * The array buffer into which the elements of the ArrayList are st ...
本文将深入地介绍关于引用对象(Reference Objects)的知识。基本上说,引用对象提供了一种对象间接引用所需内存的方式,这些引用对象保存在一个引用对象中(类ReferenceQuene),它监视这些引用对象使得其可以访问。基于这种类 ...
Java泛型(generics)是JDK 5中引入的一个新特性,允许在定义类和接口的时候使用类型参数(type parameter)。声明的类型参数在使用时用具体的类型来替换。泛型最主要的应用是在JDK 5中的新集合类框架中。对于泛型概念的引入,开 ...
服务提供者框架是指:多个服务提供者实现一个服务,系统为客户端提供多个实现,并把他们从多个实现中解耦出来。服务提供者的改变对它们的客户端是透明的,这样提供了更好的可扩展性。例如,JDBC,JMS等就试用了服务提供者框架。       服务提供者的组件:       Service Interface:服务接口,通过抽象统一声明,由服务提供者实现。       Provider Registration API:服务提供者注册API,用于系统注册服务提供者,使得客户端可以访问它实现的服务。       Service Access API:服务访问API,用户客户端获取相应的服务。   ...
A specialized Set implementation for use with enum types. All of the elements in an enum set must come from a single enum type that is specified, explicitly or implicitly, when the set is created. Enum sets are represented internally as bit vectors. This representation is extremely compact and effici ...
  1.1 何为APR? APR(Apache portable Run-time libraries,Apache可移植运行库)的目的如其名称一样,主要为上层的应用程序提供一个可以跨越多操作系统平台使用的底层支持接口库。在早期的Apache版本中,应用程序本身必须能够处理各种具 ...
APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t in_size){    将in_size调整为index整数倍的    /*先查看active节点,active是内存池中的激活节点,所有的内存都从这个节点中分配*/    if(active节点就能够满足分配要求)    {        直接从active分配内存        返回了        /*这里不会往下执行,直接返回了,也就不会理睬在active分配内存之后,还是不是链表中的最大 节点,所以tingya的对这个地方的解释不完全正确,应该是active节点是 ...
char* apr_pstrdup ( apr_pool_t *  p,     const char *  s     ) duplicate a string into memory allocated out of a pool Parameters:   p  The pool to allocate out of   s  The string to duplicate Returns: The new string  
Global site tag (gtag.js) - Google Analytics