MeasureUnit Class

Definition

A unit such as length, mass, volume, currency, etc.

[Android.Runtime.Register("android/icu/util/MeasureUnit", ApiSince=24, DoNotGenerateAcw=true)]
public class MeasureUnit : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.IO.ISerializable
[<Android.Runtime.Register("android/icu/util/MeasureUnit", ApiSince=24, DoNotGenerateAcw=true)>]
type MeasureUnit = class
    inherit Object
    interface ISerializable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
MeasureUnit
Derived
Attributes
Implements

Remarks

A unit such as length, mass, volume, currency, etc. A unit is coupled with a numeric amount to produce a Measure. MeasureUnit objects are immutable. All subclasses must guarantee that. (However, subclassing is discouraged.)

Java documentation for android.icu.util.MeasureUnit.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

MeasureUnit(IntPtr, JniHandleOwnership)

Properties

Acre

Constant for unit of area: acre

AcreFoot

Constant for unit of volume: acre-foot

Ampere

Constant for unit of electric: ampere

ArcMinute

Constant for unit of angle: arc-minute

ArcSecond

Constant for unit of angle: arc-second

AstronomicalUnit

Constant for unit of length: astronomical-unit

Atmosphere

Constant for unit of pressure: atmosphere

Available

Get all of the available units.

AvailableTypes

Get all of the available units' types.

Bit

Constant for unit of digital: bit

Bushel

Constant for unit of volume: bushel

Byte

Constant for unit of digital: byte

Calorie

Constant for unit of energy: calorie

Candela

Constant for unit of light: candela

Carat

Constant for unit of mass: carat

Celsius

Constant for unit of temperature: celsius

Centiliter

Constant for unit of volume: centiliter

Centimeter

Constant for unit of length: centimeter

Century

Constant for unit of duration: century

Class

Returns the runtime class of this Object.

(Inherited from Object)
CubicCentimeter

Constant for unit of volume: cubic-centimeter

CubicFoot

Constant for unit of volume: cubic-foot

CubicInch

Constant for unit of volume: cubic-inch

CubicKilometer

Constant for unit of volume: cubic-kilometer

CubicMeter

Constant for unit of volume: cubic-meter

CubicMile

Constant for unit of volume: cubic-mile

CubicYard

Constant for unit of volume: cubic-yard

Cup

Constant for unit of volume: cup

CupMetric

Constant for unit of volume: cup-metric

Day

Constant for unit of duration: day

Decade

Constant for unit of duration: decade

Deciliter

Constant for unit of volume: deciliter

Decimeter

Constant for unit of length: decimeter

Degree

Constant for unit of angle: degree

Dimensionality

Returns the dimensionality (power) of this MeasureUnit.

Dot

Constant for unit of graphics: dot

DotPerCentimeter

Constant for unit of graphics: dot-per-centimeter

DotPerInch

Constant for unit of graphics: dot-per-inch

Em

Constant for unit of graphics: em

Fahrenheit

Constant for unit of temperature: fahrenheit

Fathom

Constant for unit of length: fathom

FluidOunce

Constant for unit of volume: fluid-ounce

Foodcalorie

Constant for unit of energy: foodcalorie

Foot

Constant for unit of length: foot

Furlong

Constant for unit of length: furlong

Gallon

Constant for unit of volume: gallon

GallonImperial

Constant for unit of volume: gallon-imperial

GenericTemperature

Constant for unit of temperature: generic

GForce

Constant for unit of acceleration: g-force

Gigabit

Constant for unit of digital: gigabit

Gigabyte

Constant for unit of digital: gigabyte

Gigahertz

Constant for unit of frequency: gigahertz

Gigawatt

Constant for unit of power: gigawatt

Gram

Constant for unit of mass: gram

Handle

The handle to the underlying Android instance.

(Inherited from Object)
Hectare

Constant for unit of area: hectare

Hectoliter

Constant for unit of volume: hectoliter

Hectopascal

Constant for unit of pressure: hectopascal

Hertz

Constant for unit of frequency: hertz

Horsepower

Constant for unit of power: horsepower

Hour

Constant for unit of duration: hour

Identifier

Get CLDR Unit Identifier for this MeasureUnit, as defined in UTS 35.

Inch

Constant for unit of length: inch

InchHg

Constant for unit of pressure: inch-ofhg

Item

Constant for unit of concentr: item

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Joule

Constant for unit of energy: joule

Karat

Constant for unit of concentr: karat

Kelvin

Constant for unit of temperature: kelvin

Kilobit

Constant for unit of digital: kilobit

Kilobyte

Constant for unit of digital: kilobyte

Kilocalorie

Constant for unit of energy: kilocalorie

Kilogram

Constant for unit of mass: kilogram

Kilohertz

Constant for unit of frequency: kilohertz

Kilojoule

Constant for unit of energy: kilojoule

Kilometer

Constant for unit of length: kilometer

KilometerPerHour

Constant for unit of speed: kilometer-per-hour

Kilowatt

Constant for unit of power: kilowatt

KilowattHour

Constant for unit of energy: kilowatt-hour

KilowattHourPer100Kilometer

Constant for unit of force: kilowatt-hour-per-100-kilometer

Knot

Constant for unit of speed: knot

LightYear

Constant for unit of length: light-year

Liter

Constant for unit of volume: liter

LiterPer100kilometers

Constant for unit of consumption: liter-per-100-kilometer

LiterPerKilometer

Constant for unit of consumption: liter-per-kilometer

Lumen

Constant for unit of light: lumen

Lux

Constant for unit of light: lux

Megabit

Constant for unit of digital: megabit

Megabyte

Constant for unit of digital: megabyte

Megahertz

Constant for unit of frequency: megahertz

Megaliter

Constant for unit of volume: megaliter

Megapixel

Constant for unit of graphics: megapixel

Megawatt

Constant for unit of power: megawatt

Meter

Constant for unit of length: meter

MeterPerSecond

Constant for unit of speed: meter-per-second

MeterPerSecondSquared

Constant for unit of acceleration: meter-per-square-second

MetricTon

Constant for unit of mass: metric-ton (renamed to tonne in CLDR 42 / ICU 72).

Microgram

Constant for unit of mass: microgram

Micrometer

Constant for unit of length: micrometer

Microsecond

Constant for unit of duration: microsecond

Mile

Constant for unit of length: mile

MilePerGallon

Constant for unit of consumption: mile-per-gallon

MilePerGallonImperial

Constant for unit of consumption: mile-per-gallon-imperial

MilePerHour

Constant for unit of speed: mile-per-hour

MileScandinavian

Constant for unit of length: mile-scandinavian

Milliampere

Constant for unit of electric: milliampere

Millibar

Constant for unit of pressure: millibar

Milligram

Constant for unit of mass: milligram

MilligramOfglucosePerDeciliter

Constant for unit of concentr: milligram-ofglucose-per-deciliter

MilligramPerDeciliter

Constant for unit of concentr: milligram-per-deciliter

Milliliter

Constant for unit of volume: milliliter

Millimeter

Constant for unit of length: millimeter

MillimeterOfMercury

Constant for unit of pressure: millimeter-ofhg

MillimolePerLiter

Constant for unit of concentr: millimole-per-liter

Millisecond

Constant for unit of duration: millisecond

Milliwatt

Constant for unit of power: milliwatt

Minute

Constant for unit of duration: minute

Month

Constant for unit of duration: month

Nanometer

Constant for unit of length: nanometer

Nanosecond

Constant for unit of duration: nanosecond

NauticalMile

Constant for unit of length: nautical-mile

Ohm

Constant for unit of electric: ohm

Ounce

Constant for unit of mass: ounce

OunceTroy

Constant for unit of mass: ounce-troy

Parsec

Constant for unit of length: parsec

PartPerMillion

Constant for unit of concentr: permillion

PeerReference (Inherited from Object)
Percent

Constant for unit of concentr: percent

Permille

Constant for unit of concentr: permille

Petabyte

Constant for unit of digital: petabyte

Picometer

Constant for unit of length: picometer

Pint

Constant for unit of volume: pint

PintMetric

Constant for unit of volume: pint-metric

Pixel

Constant for unit of graphics: pixel

PixelPerCentimeter

Constant for unit of graphics: pixel-per-centimeter

PixelPerInch

Constant for unit of graphics: pixel-per-inch

Point

Constant for unit of length: point

Pound

Constant for unit of mass: pound

PoundPerSquareInch

Constant for unit of pressure: pound-force-per-square-inch

Prefix
Quart

Constant for unit of volume: quart

Quarter

Constant for unit of duration: quarter

Radian

Constant for unit of angle: radian

RevolutionAngle

Constant for unit of angle: revolution

Second

Constant for unit of duration: second

SquareCentimeter

Constant for unit of area: square-centimeter

SquareFoot

Constant for unit of area: square-foot

SquareInch

Constant for unit of area: square-inch

SquareKilometer

Constant for unit of area: square-kilometer

SquareMeter

Constant for unit of area: square-meter

SquareMile

Constant for unit of area: square-mile

SquareYard

Constant for unit of area: square-yard

Stone

Constant for unit of mass: stone

Subtype

Get the subType, such as “foot”.

Tablespoon

Constant for unit of volume: tablespoon

Teaspoon

Constant for unit of volume: teaspoon

Terabit

Constant for unit of digital: terabit

Terabyte

Constant for unit of digital: terabyte

ThresholdClass
ThresholdType
Ton

Constant for unit of mass: ton

Tonne

Constant for unit of mass: tonne

Type

Get the type, such as "length".

Volt

Constant for unit of electric: volt

Watt

Constant for unit of power: watt

Week

Constant for unit of duration: week

Yard

Constant for unit of length: yard

Year

Constant for unit of duration: year

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
ForIdentifier(String)

Construct a MeasureUnit from a CLDR Core Unit Identifier, defined in UTS 35.

GetAvailable(String)

For the given type, return the available units.

GetComplexity()
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
Product(MeasureUnit)

Computes the product of this unit with another unit.

Reciprocal()

Computes the reciprocal of this MeasureUnit, with the numerator and denominator flipped.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SplitToSingleUnits()

Returns the list of SINGLE units contained within a sequence of COMPOUND units.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
WithDimensionality(Int32)

Creates a MeasureUnit which is this SINGLE unit augmented with the specified dimensionality (power).

WithPrefix(MeasureUnit+MeasurePrefix)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to