commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37015] - Add KeyedList To commons
Date Tue, 11 Oct 2005 02:39:29 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37015>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37015





------- Additional Comments From edalquist@unicon.net  2005-10-11 04:39 -------
Created an attachment (id=16650)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=16650&action=view)
Base implementation of the KeyedList interface

An example implementation of the abstract getKey method:


public Object getKey(Object value) {
    if (value == null) {
	return null;
    }

    if (!(value instanceof IPreference)) {
	throw new IllegalArgumentException("value must be instance of
IPreference");
    }
    
    return ((IPreference)value).getName();
}

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message