Package com.barchart.util.value.impl

Source Code of com.barchart.util.value.impl.BaseSize

/**
* Copyright (C) 2011-2013 Barchart, Inc. <http://www.barchart.com/>
*
* All rights reserved. Licensed under the OSI BSD License.
*
* http://www.opensource.org/licenses/bsd-license.php
*/
package com.barchart.util.value.impl;

import com.barchart.util.value.ValueFactoryImpl;
import com.barchart.util.value.api.Size;

abstract class BaseSize extends BaseScaled<Size> implements Size {
 
  @Override
  protected Size result(final long mantissa, final int exponent) {
    return ValueFactoryImpl.instance.newSize(mantissa, exponent);
  }

  @Override
  public final boolean equals(final Object thatValue) {
    if (thatValue instanceof Size) {
      final Size that = (Size) thatValue;
      return this.compareTo(that) == 0;
    }
    return false;
  }
 
  @Override
  public boolean isNull() {
    return this == Size.NULL;
  }

}
TOP

Related Classes of com.barchart.util.value.impl.BaseSize

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.