float[]
Note that Nit Float
is the size of a double, so storing them in a
JavaFloatArray
may lead to a loss of precision.
java :: JavaFloatArray :: defaultinit
java $ JavaFloatArray :: SELF
Type of this instance, automatically specialized in every classcore :: Collection :: CONCURRENT
Type of the concurrent variant of this collectioncore :: Pointer :: address_is_null
Is the address behind this Object at NULL?jvm :: JavaObject :: as_exception
jvm :: JavaObject :: as_http_response
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Collection :: combinations
Allr
-length combinations on self (in same order) without repeated elements.
core :: Collection :: combinations_with_replacement
Allr
-length combination on self (in same order) with repeated elements.
java :: AbstractJavaArray :: defaultinit
core :: Pointer :: defaultinit
core :: Object :: defaultinit
core :: SequenceRead :: defaultinit
jvm :: JavaObject :: defaultinit
java :: JavaFloatArray :: defaultinit
core :: Collection :: defaultinit
core :: SequenceRead :: get_or_default
Try to get an element, returndefault
if the index
is invalid.
core :: SequenceRead :: get_or_null
Try to get an element, returnnull
if the index
is invalid.
core :: Collection :: has_all
Does the collection contain at least each element ofother
?
core :: Collection :: has_any
Does the collection contain at least one element ofother
?
core :: Collection :: has_exactly
Does the collection contain exactly all the elements ofother
?
core :: SequenceRead :: index_of_from
The index of the first occurrence ofitem
, starting from pos.
jvm :: JavaObject :: is_exception
jvm :: JavaObject :: is_http_response
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: SequenceRead :: iterator_from
Gets a new Iterator starting at positionpos
core :: SequenceRead :: last_index_of
The index of the last occurrence ofitem
.
core :: SequenceRead :: last_index_of_from
The index of the last occurrence ofitem
starting from pos
and decrementing.
core :: SequenceRead :: modulo_index
Returns the real index for a modulo index.core :: Object :: native_class_name
The class name of the object in CString format.core :: Pointer :: native_equals
jvm :: JavaObject :: new_global_ref
Returns a global reference to the Java object behind this referencecore :: Object :: output_class_name
Display class name on stdout (debug only).core :: Collection :: permutations
Allr
-length permutations on self (all possible ordering) without repeated elements.
jvm :: JavaObject :: pop_from_local_frame
Pops the current local reference frame and return a valid reference to selfjvm :: JavaObject :: pop_from_local_frame_with_env
Java implementation ofpop_from_local_frame
core :: Pointer :: premultiply_alpha
Multiply RGB values by their alpha valuecore :: Collection :: product
Cartesian product, overr
times self
.
core :: SequenceRead :: reverse_iterator
Gets an iterator starting at the end and going backwardscore :: SequenceRead :: reverse_iterator_from
Gets an iterator on the chars of self starting frompos
core :: Collection :: serialize_to_pure_json
Utility to serialize a normal Json arraycore :: Collection :: to_concurrent
Wrapsself
in a thread-safe collection
core :: Collection :: to_counter
Create and fill up a counter with the elements of `self.core :: Collection :: to_curlslist
Convert Collection[String] to CURLSListjvm :: JavaObject :: to_java_string
JavaString
representation of self
using Java's toString
core :: Collection :: to_shuffle
Return a new array made of elements in a random order.
# Java primitive array `float[]`
#
# Note that Nit `Float` is the size of a double, so storing them in a
# `JavaFloatArray` may lead to a loss of precision.
extern class JavaFloatArray in "Java" `{ float[] `}
super AbstractJavaArray[Float]
# Get a new array of the given `size`
new(size: Int) in "Java" `{ return new float[(int)size]; `}
redef fun [](i) in "Java" `{ return (double)self[(int)i]; `}
redef fun []=(i, e) in "Java" `{ self[(int)i] = (float)e; `}
redef fun length in "Java" `{ return self.length; `}
end
lib/java/collections.nit:91,1--106,3