GeezerVison is showing docs.oracle.com — FloatBuffer (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
- Summary:
- Nested |
- Field |
- Constr |
- Method
- Detail:
- Field |
- Constr |
- Method
compact1, compact2, compact3
java.nio
Class FloatBuffer
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
| Modifier and Type |
Method |
Description |
static FloatBuffer |
allocate(int capacity) |
Allocates a new float buffer.
|
float[] |
array() |
Returns the float array that backs this
buffer (optional operation).
|
int |
arrayOffset() |
Returns the offset within this buffer's backing array of the first
element of the buffer (optional operation).
|
abstract FloatBuffer |
asReadOnlyBuffer() |
Creates a new, read-only float buffer that shares this buffer's
content.
|
abstract FloatBuffer |
compact() |
Compacts this buffer (optional operation).
|
int |
compareTo(FloatBuffer that) |
Compares this buffer to another.
|
abstract FloatBuffer |
duplicate() |
Creates a new float buffer that shares this buffer's content.
|
boolean |
equals(Object ob) |
Tells whether or not this buffer is equal to another object.
|
abstract float |
get() |
Relative get method.
|
FloatBuffer |
get(float[] dst) |
Relative bulk get method.
|
FloatBuffer |
get(float[] dst,
int offset,
int length) |
Relative bulk get method.
|
abstract float |
get(int index) |
Absolute get method.
|
boolean |
hasArray() |
Tells whether or not this buffer is backed by an accessible float
array.
|
int |
hashCode() |
Returns the current hash code of this buffer.
|
abstract boolean |
isDirect() |
Tells whether or not this float buffer is direct.
|
abstract ByteOrder |
order() |
Retrieves this buffer's byte order.
|
abstract FloatBuffer |
put(float f) |
Relative put method (optional operation).
|
FloatBuffer |
put(float[] src) |
Relative bulk put method (optional operation).
|
FloatBuffer |
put(float[] src,
int offset,
int length) |
Relative bulk put method (optional operation).
|
FloatBuffer |
put(FloatBuffer src) |
Relative bulk put method (optional operation).
|
abstract FloatBuffer |
put(int index,
float f) |
Absolute put method (optional operation).
|
abstract FloatBuffer |
slice() |
Creates a new float buffer whose content is a shared subsequence of
this buffer's content.
|
String |
toString() |
Returns a string summarizing the state of this buffer.
|
static FloatBuffer |
wrap(float[] array) |
Wraps a float array into a buffer.
|
static FloatBuffer |
wrap(float[] array,
int offset,
int length) |
Wraps a float array into a buffer.
|
-
Methods inherited from class java.nio.Buffer
capacity, clear, flip, hasRemaining, isReadOnly, limit, limit, mark, position, position, remaining, reset, rewind
-
-
Method Detail
-
get
public abstract float get()
Relative get method. Reads the float at this buffer's
current position, and then increments the position.
- Returns:
- The float at the buffer's current position
- Throws:
BufferUnderflowException - If the buffer's current position is not smaller than its limit
-
hashCode
public int hashCode()
Returns the current hash code of this buffer.
The hash code of a float buffer depends only upon its remaining
elements; that is, upon the elements from position() up to, and
including, the element at limit() - 1.
Because buffer hash codes are content-dependent, it is inadvisable
to use buffers as keys in hash maps or similar data structures unless it
is known that their contents will not change.
- Overrides:
hashCode in class Object
- Returns:
- The current hash code of this buffer
- See Also:
Object.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)
Java™ Platform Standard Ed. 8
- Summary:
- Nested |
- Field |
- Constr |
- Method
- Detail:
- Field |
- Constr |
- Method
Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
|