Class

NSUnitConverter

An abstract class that provides a description of how to convert a unit to and from the base unit of its dimension. ある抽象クラス、それはどのようにある単位をそれの次元の基本単位へとそしてそれから変換するかの記述を提供します。

Declaration 宣言

@interface NSUnitConverter : NSObject

Overview 概要

For units that can be converted by a scale factor or linear equation, use the concrete subclass NSUnitConverterLinear. スケール因子または一次方程式によって変換可能である単位に対して、具象サブクラスNSUnitConverterLinearを使ってください。

Subclassing Notes サブクラス作成の注意

NSUnitConverter is an abstract class that is intended for subclassing. You can implement your own subclass of NSUnitConverter to convert between units according to any desired mapping function. For example, units may be converted using a logarithmic, exponential, or quantile scale. NSUnitConverterは、サブクラスを作ることを意図される抽象クラスです。あなたは、NSUnitConverterのあなた独自のサブクラスを実装して、単位間の変換を何らかの望みのマッピング関数によって可能にします。例えば、単位は、対数、指数、または分位数の尺度で変換されるかもしれません。

Methods to Override メソッドのオーバーライド

All subclasses must fully implement the following methods: 全てのサブクラスは、完全に以下のメソッドを実装しなければなりません:

Alternatives to Subclassing サブクラス作成の代わりとなるもの

As stated above, most physical units can be converted using a linear equation with NSUnitConverterLinear. You should only create a custom subclass of NSUnitConverter for units that cannot be converted in this way. 上で述べた通り、ほとんどの物理単位は一次方程式を使って変換されることがNSUnitConverterLinearで可能です。あなたは、NSUnitConverterのあつらえのサブクラスを作成することを、この方法で変換されることができない単位に対してのみにするべきです。

Topics 話題

Converting Between Units 単位間で変換する

Relationships 関係

Inherits From 継承元

See Also 参照

Conversion 変換