o != arg0
is the same as !(o == (arg0))
.
o != arg0
is the same as !(o == (arg0))
.
the object to compare against this object for dis-equality.
false
if the receiver object is equivalent to the argument; true
otherwise.
o == arg0
is the same as if (o eq null) arg0 eq null else o.equals(arg0)
.
o == arg0
is the same as if (o eq null) arg0 eq null else o.equals(arg0)
.
the object to compare against this object for equality.
true
if the receiver object is equivalent to the argument; false
otherwise.
o == arg0
is the same as o.equals(arg0)
.
o == arg0
is the same as o.equals(arg0)
.
the object to compare against this object for equality.
true
if the receiver object is equivalent to the argument; false
otherwise.
This method is used to cast the receiver object to be of type T0
.
This method is used to cast the receiver object to be of type T0
.
Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression1.asInstanceOf[String]
will throw a ClassCastException
at runtime, while the expressionList(1).asInstanceOf[List[String]]
will not. In the latter example, because the type argument is erased as
part of compilation it is not possible to check whether the contents of the list are of the requested typed.
the receiver object.
This method creates and returns a copy of the receiver object.
This method creates and returns a copy of the receiver object.
The default implementation of the clone
method is platform dependent.
a copy of the receiver object.
Compute the CRC32 of the segment of the byte array given by the specificed size and offset
Compute the CRC32 of the segment of the byte array given by the specificed size and offset
The bytes to checksum
The CRC32
Compute the CRC32 of the byte array
Compute the CRC32 of the byte array
The array to compute the checksum for
The CRC32
Print an error message and shutdown the JVM
Print an error message and shutdown the JVM
The error message
Create a daemon thread
Create a daemon thread
The name of the thread
The runction to execute in the thread
The unstarted thread
Create a daemon thread
Create a daemon thread
The name of the thread
The runnable to execute in the background
The unstarted thread
This method is used to test whether the argument (arg0
) is a reference to the
receiver object (this
).
This method is used to test whether the argument (arg0
) is a reference to the
receiver object (this
).
The eq
method implements an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation] on
non-null instances of AnyRef
:
* It is reflexive: for any non-null instance x
of type AnyRef
, x.eq(x)
returns true
.
* It is symmetric: for any non-null instances x
and y
of type AnyRef
, x.eq(y)
returns true
if and
only if y.eq(x)
returns true
.
* It is transitive: for any non-null instances x
, y
, and z
of type AnyRef
if x.eq(y)
returns true
and y.eq(z)
returns true
, then x.eq(z)
returns true
.
Additionally, the eq
method has three other properties.
* It is consistent: for any non-null instances x
and y
of type AnyRef
, multiple invocations of
x.eq(y)
consistently returns true
or consistently returns false
.
* For any non-null instance x
of type AnyRef
, x.eq(null)
and null.eq(x)
returns false
.
* null.eq(null)
returns true
.
When overriding the equals
or hashCode
methods, it is important to ensure that their behavior is
consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2
), they
should be equal to each other (o1 == o2
) and they should hash to the same value (o1.hashCode == o2.hashCode
).
the object to compare against this object for reference equality.
true
if the argument is a reference to the receiver object; false
otherwise.
Test if two byte buffers are equal.
Test if two byte buffers are equal. In this case equality means having the same bytes from the current position to the limit
This method is used to compare the receiver object (this
) with the argument object (arg0
) for equivalence.
This method is used to compare the receiver object (this
) with the argument object (arg0
) for equivalence.
The default implementations of this method is an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence
relation]:
* It is reflexive: for any instance x
of type Any
, x.equals(x)
should return true
.
* It is symmetric: for any instances x
and y
of type Any
, x.equals(y)
should return true
if and
only if y.equals(x)
returns true
.
* It is transitive: for any instances x
, y
, and z
of type AnyRef
if x.equals(y)
returns true
and
y.equals(z)
returns true
, then x.equals(z)
should return true
.
If you override this method, you should verify that your implementation remains an equivalence relation.
Additionally, when overriding this method it is often necessary to override hashCode
to ensure that objects
that are "equal" (o1.equals(o2)
returns true
) hash to the same
scala.Int
(o1.hashCode.equals(o2.hashCode)
).
the object to compare against this object for equality.
true
if the receiver object is equivalent to the argument; false
otherwise.
This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.
This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.
The details of when and if the finalize
method are invoked, as well as the interaction between finalize
and non-local returns and exceptions, are all platform dependent.
Read a boolean value from the properties instance
Read a boolean value from the properties instance
The properties to read from
The property name
The default value to use if the property is not found
the boolean value
Returns a representation that corresponds to the dynamic class of the receiver object.
Returns a representation that corresponds to the dynamic class of the receiver object.
The nature of the representation is platform dependent.
a representation that corresponds to the dynamic class of the receiver object.
Read an integer from the properties instance
Read an integer from the properties instance
The properties to read from
The property name
The default value to use if the property is not found
the integer value
Read a required integer property value or throw an exception if no such property is found
Read a required integer property value or throw an exception if no such property is found
Read an integer from the properties instance.
Read an integer from the properties instance. Throw an exception if the value is not in the given range (inclusive)
The properties to read from
The property name
The default value to use if the property is not found
The range in which the value must fall (inclusive)
the integer value
Get a property of type java.
Get a property of type java.util.Properties or return the default if no such property is defined
Get a property of type java.
Get a property of type java.util.Properties or throw and exception if no such property is defined.
Get a string property or throw and exception if no such property is defined.
Get a string property or throw and exception if no such property is defined.
Get a string property, or, if no such property is defined, return the given default value
Get a string property, or, if no such property is defined, return the given default value
Read an unsigned integer from the given position without modifying the buffers position
Read an unsigned integer from the given position without modifying the buffers position
the index from which to read the integer
The integer read, as a long to avoid signedness
Read an unsigned integer from the current position in the buffer, incrementing the position by 4 bytes
Read an unsigned integer from the current position in the buffer, incrementing the position by 4 bytes
The integer read, as a long to avoid signedness
Group the given values by keys extracted with the given function
Group the given values by keys extracted with the given function
Returns a hash code value for the object.
Returns a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)
) yet
not be equal (o1.equals(o2)
returns false
). A degenerate implementation could always return 0
.
However, it is required that if two objects are equal (o1.equals(o2)
returns true
) that they have
identical hash codes (o1.hashCode.equals(o2.hashCode)
). Therefore, when overriding this method, be sure
to verify that the behavior is consistent with the equals
method.
the hash code value for the object.
Compute the hash code for the given items
Compute the hash code for the given items
This method is used to test whether the dynamic type of the receiver object is T0
.
This method is used to test whether the dynamic type of the receiver object is T0
.
Note that the test result of the test is modulo Scala's erasure semantics. Therefore the expression1.isInstanceOf[String]
will return false
, while the expression List(1).isInstanceOf[List[String]]
will
return true
. In the latter example, because the type argument is erased as part of compilation it is not
possible to check whether the contents of the list are of the requested typed.
true
if the receiver object is an instance of erasure of type T0
; false
otherwise.
Read a properties file from the given path
Read a properties file from the given path
The path of the file to read
Wrap the given function in a java.
Wrap the given function in a java.lang.Runnable that logs any errors encountered
A function
A Runnable that just executes the function
o.ne(arg0)
is the same as !(o.eq(arg0))
.
o.ne(arg0)
is the same as !(o.eq(arg0))
.
the object to compare against this object for reference dis-equality.
false
if the argument is not a reference to the receiver object; true
otherwise.
Create a new thread
Create a new thread
The name of the thread
The work for the thread to do
Should the thread block JVM shutdown?
The unstarted thread
Wakes up a single thread that is waiting on the receiver object's monitor.
Wakes up a single thread that is waiting on the receiver object's monitor.
Wakes up all threads that are waiting on the receiver object's monitor.
Wakes up all threads that are waiting on the receiver object's monitor.
Open a channel for the given file
Open a channel for the given file
Write the given long value as a 4 byte unsigned integer.
Write the given long value as a 4 byte unsigned integer. Overflow is ignored.
The buffer to write to
The position in the buffer at which to begin writing
The value to write
Write the given long value as a 4 byte unsigned integer.
Write the given long value as a 4 byte unsigned integer. Overflow is ignored.
The buffer to write to
The value to write
Read some bytes into the provided buffer, and return the number of bytes read.
Read some bytes into the provided buffer, and return the number of bytes read. If the channel has been closed or we get -1 on the read for any reason, throw an EOFException
Read a byte array from the given offset and size in the buffer TODO: Should use System.
Read a byte array from the given offset and size in the buffer TODO: Should use System.arraycopy
Read size prefixed string where the size is stored as a 2 byte short.
Read size prefixed string where the size is stored as a 2 byte short.
The buffer to read from
The encoding in which to read the string
Register the given mbean with the platform mbean server, unregistering any mbean that was there before
Register the given mbean with the platform mbean server, unregistering any mbean that was there before
The object to register as an mbean
The name to register this mbean with
Recursively delete the given file/directory and any subfiles (if any exist)
Recursively delete the given file/directory and any subfiles (if any exist)
The root file at which to begin deleting
Recursively delete the given file/directory and any subfiles (if any exist)
Recursively delete the given file/directory and any subfiles (if any exist)
The root file at which to begin deleting
Wrap the given function in a java.
Wrap the given function in a java.lang.Runnable
A function
A Runnable that just executes the function
Do the given action and log any exceptions thrown without rethrowing them
Do the given action and log any exceptions thrown without rethrowing them
The log method to use for logging. E.g. logger.warn
The action to execute
Translate the given buffer into a string
Translate the given buffer into a string
The buffer to translate
The encoding to use in translating bytes to characters
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
a string representation of the object.
Unregister the mbean with the given name, if there is one registered
Unregister the mbean with the given name, if there is one registered
The mbean name to unregister
Write a size prefixed string where the size is stored as a 2 byte short
Write a size prefixed string where the size is stored as a 2 byte short
The buffer to write to
The string to write
The encoding in which to write the string
Helper functions!