Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #11029

Re: Inner class and interface question (I posted some really long code)

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail
From GGolf <invalid@invalid.com>
Newsgroups comp.lang.java.programmer
Subject Re: Inner class and interface question (I posted some really long code)
Date Fri, 30 Dec 2011 12:32:31 +0530
Organization Aioe.org NNTP Server
Lines 11
Message-ID <jdjnm7$scm$1@speranza.aioe.org> (permalink)
References <e787d461-ab1a-417a-9c81-0caa4d1e7ac8@x34g2000prb.googlegroups.com>
NNTP-Posting-Host jw0vciXepQwojOpkqiGs5A.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110419 Thunderbird/3.1.9
X-Notice Filtered by postfilter v. 0.8.2
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11029

Show key headers only | View raw


On 12/28/2011 11:59 AM, Chad wrote:
> I'm want to put the getHead() method in the BagInterface. However, I
> can't do this because the compiler keeps saying it can't find 'class
> Node' in Location BagInterface<T>. I guess this is because Node is an
> inner class of my LinkedList class. Ideas how to fix this? Ideally I
> want to preserve the inner class.

Referencing an inner class in the way you have described doesn't seem 
quite right. An interface shouldn't have any knowledge of its 
implementors. You should probably extract the class so that it's no 
longer an inner class.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Inner class and interface question (I posted some really long code) Chad <cdalten@gmail.com> - 2011-12-27 22:29 -0800
  Re: Inner class and interface question (I posted some really long code) Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-12-27 23:27 -0800
  Re: Inner class and interface question (I posted some really long code) Patricia Shanahan <pats@acm.org> - 2011-12-28 09:53 -0800
  Re: Inner class and interface question (I posted some really long code) GGolf <invalid@invalid.com> - 2011-12-30 12:32 +0530
    Re: Inner class and interface question (I posted some really long code) Patricia Shanahan <pats@acm.org> - 2011-12-30 05:40 -0800
  Re: Inner class and interface question (I posted some really long code) Roedy Green <see_website@mindprod.com.invalid> - 2011-12-31 06:40 -0800

csiph-web