Re: Simpler way to filter



On 05/09/2008 16:23, laredotornado allegedly wrote:
Hi,

I'm using Java 1.5. I have a Vector of objects,

*BZZT*. The only possible reason you could justifiably use a java.util.Vector would be if you coded with a JSE version prior to 1.2.

all of type
"MyProperty". What I want is to filter the vector and keep the
elements whose "MyProperty.getName.equals(someString)". Is there any
easier way of doing this rather than iterating over the Vector,
looking at each element, then adding that element to the new, filtered
vector depending on whether it has met the conditions?

No.

Removing elements is slower in every but the most trivial cases.

--
DF.
.



Relevant Pages

  • =?ISO-8859-1?Q?Re=3A_Java_Code_in_XSL_aufrufen_=FCber_javax=2Exml=2Etransf?= =?ISO-8859&
    ...     public class Filter { ... Nochmal mein Java Code von der Factory: ... ok ich habe jetzt den XALAN Prozessor eingebunden (zumindest die XALAN ...
    (de.comp.text.xml)
  • Re: Hallo
    ... Das stinkt mir persönlich zu sehr nach funktionaler Programmierung und ... C# ist im übrigen nicht weniger OO als Java und bietet mit den ... Normalerweise kommt ja aus einem Filter nichts ... Das ist dann sogar noch funktionaler als Stefans Lösung, ...
    (de.comp.lang.java)
  • [UNIX]Cross-Site Scripting Filter Evasion in Various Frameworks / Applications
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Cross-Site Scripting Filter Evasion in Various Frameworks / Applications ... Popoon/Flux-CMS version r22196 and prior ...
    (Securiteam)
  • RE: Please help me find some direction
    ... Why not just a query filtered for records with unpaid time with dates prior ... to the week we are generating the timesheet for I want to be able to decide ... This is done using a recordset and a loop to filter a report. ...
    (microsoft.public.access.modulesdaovba)
  • [SLE] Fw: Java
    ... I'm running a java based content filter on a Suse 9.1 Server. ... filter uses ClamAV and sometimes the clamav and the java process uses 99.9% ...
    (SuSE)