Package org.ehcache.config
Interface ResourceUnit
- All Known Implementing Classes:
EntryUnit,MemoryUnit
public interface ResourceUnit
Represents a unit in which quantity is expressed in a
SizedResourcePool.-
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(long thisSize, long thatSize, ResourceUnit thatUnit) ComparesthisSizein this unit tothatSizeinthatUnit.
-
Method Details
-
compareTo
ComparesthisSizein this unit tothatSizeinthatUnit.Returns 1, 0, or -1 if the
thisSizeofthisis greater than, equal to, or less thanthatSizeofthatUnitrespectively.- Parameters:
thisSize- size in this unitthatSize- size inthatUnitthatUnit- otherResourceUnit- Returns:
- as per the
compareTocontract - Throws:
IllegalArgumentException- if the units are not comparable
-