- ... León0.1
- DEIOC Universidad de La Laguna
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... polymorphism2.1
-
The term "polymorphism" refers to the ability of code (in particular, methods or classes) to act on values of multiple types, or to the ability of different instances of the same data-structure to contain elements of different types.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...contract2.2
-
The central idea of contract is a metaphor on how elements of a software
system collaborate with each other, on the basis of mutual obligations
and benefits. The metaphor comes from business life, where a "client"
and a "supplier" agree on a "contract" which defines for example that:
- The supplier must provide a certain product (obligation) and is entitled to expect that the client has paid its fee (benefit).
- The client must pay the fee (obligation) and is entitled to get the product (benefit).
- Both parties must satisfy certain obligations, such as laws and regulations, applying to all contracts.
Similarly, if a routine from a class in object-oriented programming provides a certain functionality, it may :
- Expect a certain condition to be guaranteed on entry by any client module that calls it: the routine's precondition — an obligation for the client, and a benefit for the supplier (the routine itself), as it frees it from having to handle cases outside of the precondition.
- Guarantee a certain property on exit: the routine's postcondition — an obligation for the supplier, and obviously a benefit (the main benefit of calling the routine) for the client.
- Maintain a certain property, assumed on entry and guaranteed on exit: the class invariant.
The contract is the formalization of these obligations and benefits. One could summarize design by contract by the "three questions" that the designer must repeatedly ask:
- What does it expect?
- What does it guarantee?
- What does it maintain?
Many languages have facilities to make assertions like these. However, Design by Contract oriented languages considers these contracts to be so crucial to software correctness that they should be part of the design process. In effect, Design by Contract advocates writing the assertions first.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...double-dispatch2.3
- In software engineering,
double dispatch is a mechanism that dispatches a function call to
different concrete functions depending on the runtime types of multiple
objects involved in the call
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... code2.4
-
A hash function is any well-defined procedure or mathematical function
that converts a large, possibly variable-sized amount of data into a
small datum, usually a single integer that may serve as an index to an
array. The values returned by a hash function are called hash values,
hash codes, hash sums, or simply hashes
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... code2.5
-
A hash function is any well-defined procedure or mathematical function
that converts a large, possibly variable-sized amount of data into a
small datum, usually a single integer that may serve as an index to an
array. The values returned by a hash function are called hash values,
hash codes, hash sums, or simply hashes
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... Reader3.1
-
Abstract class for reading character streams. The only methods that a
subclass must implement are read(char[], int, int)
and close().
read(char[], int, int) read characters into a portion of an array.
This method will block until some input is available, an I/O error occurs,
or the end of the stream is reached.
The meaning of the parameters is: Destination buffer, Offset at which to start storing characters,
Maximum number of characters to read. It returns the number of characters
read, or -1 if the end of the stream has been reached. It throwsi
an IOException if an I/O error occurs.
Most subclasses, however, will override some of the
methods defined in order to provide higher efficiency, additional
functionality, or both.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- .../Writer3.2
-
Abstract class for writing to character streams. The only methods
that a subclass must implement are write(char[], int, int), flush(),
and close(). Most subclasses, however, will override some of the
methods defined in order to provide higher efficiency, additional
functionality, or both.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... InputStream3.3
-
This abstract class is the superclass of all classes representing an input stream of bytes.
Applications that need to define a subclass of InputStream must always provide a method that returns the next byte of input.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- .../OutputStream3.4
-
This abstract class is the superclass of all classes representing an output stream of bytes. An output stream accepts output bytes and sends them to some sink.
Applications that need to define a subclass of OutputStream must always provide at least a method that writes one byte of output.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
MXBean
6.1
-
In the Java Management Extensions API, MXBean refers to a managed bean
- sometimes simply
referred to as an MBean - is a type of JavaBean that implement resources and their instrumentation
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... GPath8.1
- GPath is a path expression language integrated into Groovy which allows parts of nested structured data to be identified. In this sense, it has similar aims and scope as XPath does for XML
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.