org.ehcache.config
Interface ResourceUnit

All Known Implementing Classes:
EntryUnit, MemoryUnit

public interface ResourceUnit


Method Summary
 int compareTo(long thisSize, long thatSize, ResourceUnit thatUnit)
          Compare thisSize of this unit to thatSize of thatUnit.
 

Method Detail

compareTo

int compareTo(long thisSize,
              long thatSize,
              ResourceUnit thatUnit)
              throws java.lang.IllegalArgumentException
Compare thisSize of this unit to thatSize of thatUnit.

Returns 1, 0, or -1 if the thisSize of this is greater than, equal to, or less than thatSize of thatUnit respectively.

Parameters:
thisSize - size in this unit
thatSize - size in thatUnit
thatUnit - other unit
Returns:
as per the conventional compare contract
Throws:
java.lang.IllegalArgumentException - if the units are not comparable