If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
![]() |
|
|
#1 |
|
Retarded moron
|
Just take a look at their "Rectangle" class implementation of "contains":
Code:
/**
* Checks whether or not this <code>Rectangle</code> contains the
* point at the specified location {@code (x,y)}.
*
* @param x the specified X coordinate
* @param y the specified Y coordinate
* @return <code>true</code> if the point
* {@code (x,y)} is inside this
* <code>Rectangle</code>;
* <code>false</code> otherwise.
* @since 1.1
*/
public boolean contains(int x, int y) {
return inside(x, y);
}
A deprecated one. What a dumbfounding situation. The Javadoc mentions to use "contains" and not "inside".
__________________
I eat coffee. |
|
|
|
|
|
#2 |
|
Off-season
Join Date: Feb 2002
Location: On the pursuit of happiness
Posts: 3,019
|
Deprecated does not mean it's gone, and it doesn't really make a difference whether you implement inside as contains or vice-versa.
"inside" is only deprecated because it's not a verb, so it doesn't fit the style recommendations.
__________________
Binary prefixes for bits and bytes |
|
|
|
|
|
#3 |
|
Monochrome wench
|
It would only be a problem if the inside() method was removed. And in that case they would just change the contains() implementation to contain the code that inside() used to have.
Deprecated functions in APIs of course can last around for years, if not forever, but just lacking documentation. You just need to look at Win32 and how many deprecated but still working functions there are still around from the Win16 days. Last edited by Colourless; 28-Jan-2007 at 22:29. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|