blob: 048a00a934a84c72b8bf6ef14d61de610ced5211 [file]
<html devsite="true">
<head>
<title>FloatRange</title>
{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<div itemscope="" itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="FloatRange">
<meta itemprop="path" content="androidx.annotation">
<meta itemprop="property" content="getFrom()">
<meta itemprop="property" content="getFromInclusive()">
<meta itemprop="property" content="getTo()">
<meta itemprop="property" content="getToInclusive()">
<meta itemprop="language" content="JAVA">
</div>
<div id="header-block">
<div>
<h1>FloatRange</h1>
</div>
<div id="metadata-info-block">
<div id="source-link"><a href="https://cs.android.com/search?q=file:androidx/annotation/FloatRange.kt+class:androidx.annotation.FloatRange&amp;ss=androidx/platform/frameworks/support" class="external">View Source</a></div>
</div>
</div>
<div id="refdoc-switcher-placeholder"></div>
<p>
<pre>@<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.annotation/-must-be-documented/index.html">MustBeDocumented</a><br>@<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.annotation/-retention/index.html">Retention</a>(value&nbsp;=&nbsp;AnnotationRetention.BINARY)<br>@<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.annotation/-target/index.html">Target</a>(allowedTargets&nbsp;=&nbsp;[AnnotationTarget.FUNCTION,&nbsp;AnnotationTarget.PROPERTY_GETTER,&nbsp;AnnotationTarget.PROPERTY_SETTER,&nbsp;AnnotationTarget.VALUE_PARAMETER,&nbsp;AnnotationTarget.FIELD,&nbsp;AnnotationTarget.LOCAL_VARIABLE,&nbsp;AnnotationTarget.ANNOTATION_CLASS])<br>public annotation <a href="/reference/androidx/annotation/FloatRange.html">FloatRange</a></pre>
</p>
<hr>
<p>Denotes that the annotated element should be a float or double in the given range</p>
<p>Example:</p>
<pre class="prettyprint">@FloatRange(from=0.0,to=1.0)<br>public float getAlpha() {<br> ...<br>}</pre>
<h2>Summary</h2>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%"><h3>Public constructors</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td>
<div><code><a href="/reference/androidx/annotation/FloatRange.html#FloatRange(kotlin.Double,kotlin.Double,kotlin.Boolean,kotlin.Boolean)">FloatRange</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;double&nbsp;from,<br>&nbsp;&nbsp;&nbsp;&nbsp;double&nbsp;to,<br>&nbsp;&nbsp;&nbsp;&nbsp;boolean&nbsp;fromInclusive,<br>&nbsp;&nbsp;&nbsp;&nbsp;boolean&nbsp;toInclusive<br>)</code></div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%"><h3>Public methods</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td><code>final double</code></td>
<td>
<div><code><a href="/reference/androidx/annotation/FloatRange.html#getFrom()">getFrom</a>()</code></div>
<p>Smallest value.</p>
</td>
</tr>
<tr>
<td><code>final boolean</code></td>
<td>
<div><code><a href="/reference/androidx/annotation/FloatRange.html#getFromInclusive()">getFromInclusive</a>()</code></div>
<p>Whether the from value is included in the range</p>
</td>
</tr>
<tr>
<td><code>final double</code></td>
<td>
<div><code><a href="/reference/androidx/annotation/FloatRange.html#getTo()">getTo</a>()</code></div>
<p>Largest value.</p>
</td>
</tr>
<tr>
<td><code>final boolean</code></td>
<td>
<div><code><a href="/reference/androidx/annotation/FloatRange.html#getToInclusive()">getToInclusive</a>()</code></div>
<p>Whether the to value is included in the range</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="list">
<h2>Public constructors</h2>
<div class="api-item"><a name="FloatRange(kotlin.Double, kotlin.Double, kotlin.Boolean, kotlin.Boolean)"></a><a name="FloatRange-kotlin.Double-kotlin.Double-kotlin.Boolean-kotlin.Boolean-"></a><a name="floatrange"></a>
<div class="api-name-block">
<div>
<h3 id="FloatRange(kotlin.Double,kotlin.Double,kotlin.Boolean,kotlin.Boolean)">FloatRange</h3>
</div>
</div>
<pre class="api-signature no-pretty-print">public&nbsp;<a href="/reference/androidx/annotation/FloatRange.html#FloatRange(kotlin.Double,kotlin.Double,kotlin.Boolean,kotlin.Boolean)">FloatRange</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;double&nbsp;from,<br>&nbsp;&nbsp;&nbsp;&nbsp;double&nbsp;to,<br>&nbsp;&nbsp;&nbsp;&nbsp;boolean&nbsp;fromInclusive,<br>&nbsp;&nbsp;&nbsp;&nbsp;boolean&nbsp;toInclusive<br>)</pre>
</div>
</div>
<div class="list">
<h2>Public methods</h2>
<div class="api-item"><a name="getFrom--"></a><a name="getfrom"></a>
<div class="api-name-block">
<div>
<h3 id="getFrom()">getFrom</h3>
</div>
</div>
<pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;double&nbsp;<a href="/reference/androidx/annotation/FloatRange.html#getFrom()">getFrom</a>()</pre>
<p>Smallest value. Whether it is inclusive or not is determined by .fromInclusive</p>
</div>
<div class="api-item"><a name="getFromInclusive--"></a><a name="getfrominclusive"></a>
<div class="api-name-block">
<div>
<h3 id="getFromInclusive()">getFromInclusive</h3>
</div>
</div>
<pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;boolean&nbsp;<a href="/reference/androidx/annotation/FloatRange.html#getFromInclusive()">getFromInclusive</a>()</pre>
<p>Whether the from value is included in the range</p>
</div>
<div class="api-item"><a name="getTo--"></a><a name="getto"></a>
<div class="api-name-block">
<div>
<h3 id="getTo()">getTo</h3>
</div>
</div>
<pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;double&nbsp;<a href="/reference/androidx/annotation/FloatRange.html#getTo()">getTo</a>()</pre>
<p>Largest value. Whether it is inclusive or not is determined by .toInclusive</p>
</div>
<div class="api-item"><a name="getToInclusive--"></a><a name="gettoinclusive"></a>
<div class="api-name-block">
<div>
<h3 id="getToInclusive()">getToInclusive</h3>
</div>
</div>
<pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;boolean&nbsp;<a href="/reference/androidx/annotation/FloatRange.html#getToInclusive()">getToInclusive</a>()</pre>
<p>Whether the to value is included in the range</p>
</div>
</div>
</body>
</html>