LRU.java :  » Database-DBMS » perst » org » garret » perst » impl » Java Open Source

Java Open Source » Database DBMS » perst 
perst » org » garret » perst » impl » LRU.java
package org.garret.perst.impl;

class LRU { 
    LRU next;
    LRU prev;

    LRU() 
    { 
        next = prev = this;
    }

    final void unlink() 
    { 
        next.prev = prev;
        prev.next = next;
    }

    final void link(LRU node) 
    { 
        node.next = next;
        node.prev = this;
        next.prev = node;
        next      = node;
    }
}

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.