/[gzz]/gzz/gzz/mem/MemoryConsumer.java
ViewVC logotype

Diff of /gzz/gzz/mem/MemoryConsumer.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by tjl, Wed Jan 8 05:40:35 2003 UTC revision 1.4 by tjl, Wed Jan 8 10:35:10 2003 UTC
# Line 5  import gzz.Obs; Line 5  import gzz.Obs;
5    
6  /** An object representing an entity which would like  /** An object representing an entity which would like
7   * to consume a significant amount of memory (large image or such).   * to consume a significant amount of memory (large image or such).
8   * Memoryconsumers <b>must</b> work as hash keys.   * Memoryconsumers <b>must</b> work as hash keys; a new consumer with
9     * the same meaning as a previous one must be found in a hash.
10   * <p>   * <p>
11   * Quality is an important variable whose semantics are not defined in this interface   * Quality is an important variable whose semantics are not defined in this interface
12   * beyond that   * beyond that
# Line 20  import gzz.Obs; Line 21  import gzz.Obs;
21  public interface MemoryConsumer {  public interface MemoryConsumer {
22      /** Whether this object can make use of byte amounts less      /** Whether this object can make use of byte amounts less
23       * than getMaxBytes() returns.       * than getMaxBytes() returns.
24         * For example, images can be scaled down but text cannot.
25       */       */
26      boolean getScalable();      boolean getScalable();
27      /** The maximum number of bytes this object would like to consume.      /** The maximum number of bytes this object would like to consume.
# Line 32  public interface MemoryConsumer { Line 34  public interface MemoryConsumer {
34       * setReservation has been called, it is undefined whether       * setReservation has been called, it is undefined whether
35       * the previous Obs will be called at all. The size, when the later Obs       * the previous Obs will be called at all. The size, when the later Obs
36       * is called, is the new one.       * is called, is the new one.
37         * <p>
38         * <b>This method may only be called by {@link MemoryPartitioner}.</b>
39       * @param bytes The maximum amount of bytes this object should reserve.       * @param bytes The maximum amount of bytes this object should reserve.
40       * @param quality Maximum quality that should be loaded (if quality is       * @param quality Maximum quality that should be loaded (if quality is
41       *          adjusted in discrete steps, the class may round upwards).       *          adjusted in discrete steps, the class may round upwards).
# Line 42  public interface MemoryConsumer { Line 46  public interface MemoryConsumer {
46       */       */
47      int getReservation();      int getReservation();
48    
49        /** Get the quality currently used.
50         */
51        float getQuality();
52    
53  }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26