parcel | Clownfish |
class variable | CFISH_INTEGER |
struct symbol | cfish_Integer |
class nickname | cfish_Int |
header file | Clownfish/Num.h |
Clownfish::Integer – Immutable 64-bit signed integer.
cfish_Integer*
cfish_Int_new(
int64_t value
);
Return a new Integer.
Initial value.
cfish_Integer*
cfish_Int_init(
cfish_Integer *self,
int64_t value
);
Initialize an Integer.
Initial value.
int64_t
cfish_Int_Get_Value(
cfish_Integer *self
);
Return the value of the Integer.
double
cfish_Int_To_F64(
cfish_Integer *self
);
Convert the Integer to floating point.
cfish_String* // incremented
cfish_Int_To_String(
cfish_Integer *self
);
Return the Integer formatted as String.
bool
cfish_Int_Equals(
cfish_Integer *self,
cfish_Obj *other
);
Indicate whether two numbers are the same.
Returns: true if other
is an Integer or Float with the same value as
self
.
int32_t
cfish_Int_Compare_To(
cfish_Integer *self,
cfish_Obj *other
);
Indicate whether one number is less than, equal to, or greater than
another. Throws an exception if other
is neither an Integer nor a
Float.
Returns: 0 if the numbers are equal, a negative number if self
is
less than other
, and a positive number if self
is greater than
other
.
cfish_Integer* // incremented
cfish_Int_Clone(
cfish_Integer *self
);
Return a clone of the object.
Clownfish::Integer is a Clownfish::Obj.
Copyright © 2010-2015 The Apache Software Foundation, Licensed under the
Apache License, Version 2.0.
Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The
Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
respective owners.