org.apache.jackrabbit.taglib.size
Class AbstractSizeCalculator

java.lang.Object
  extended byorg.apache.jackrabbit.taglib.size.AbstractSizeCalculator
All Implemented Interfaces:
SizeCalculator
Direct Known Subclasses:
SimpleSizeCalculator

public abstract class AbstractSizeCalculator
extends java.lang.Object
implements SizeCalculator

Superclass of SizeCalculator

Author:
Edgar Poce

Field Summary
protected  int unit
          Unit
 
Fields inherited from interface org.apache.jackrabbit.taglib.size.SizeCalculator
BITS, BYTES, GIGABYTES, KILOBYTES, MEGABYTES
 
Constructor Summary
AbstractSizeCalculator()
           
 
Method Summary
protected  double convert(long size, int unit)
          Unit conversion
 void setUnit(int unit)
          Sets the unit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jackrabbit.taglib.size.SizeCalculator
getSize, getSize
 

Field Detail

unit

protected int unit
Unit

Constructor Detail

AbstractSizeCalculator

public AbstractSizeCalculator()
Method Detail

convert

protected double convert(long size,
                         int unit)
Unit conversion

Parameters:
unit -
Returns:

setUnit

public void setUnit(int unit)
Description copied from interface: SizeCalculator
Sets the unit

Specified by:
setUnit in interface SizeCalculator
Parameters:
unit -


Copyright © 2005 . All Rights Reserved.