Re: Any API to sort this Vector?

From: Michael Borgwardt (brazil_at_brazils-animeland.de)
Date: 07/16/04


Date: Fri, 16 Jul 2004 14:35:41 +0200

Edith wrote:
> I have a vector consists of object of String Array.
> i.e. my vector is:
> [ {"user3", "privilege4"}, {"user2", "privilege1"}, {"user3", "privilege2"},
> etc ]
>
> Are there any API so that I can sort this vector to give me:
> [ {"user2", "privilege1"}, {"user3", "privilege2"}, , {"user3",
> "privilege4"}, etc ]
> i.e. sort by first element then the second element.

Use java.util.Collections.sort() with a simple Comparator implementation to
handle the arrays.



Relevant Pages

  • Any API to sort this Vector?
    ... I have a vector consists of object of String Array. ... Are there any API so that I can sort this vector to give me: ... i.e. sort by first element then the second element. ...
    (comp.lang.java.programmer)
  • passing string array to C++
    ... I have an unmanaged api I need to call. ... DLL_API long MyAdapt(long g, WCHAR **strings, long numStrings) ... How do I pass a string array to unmanaged C++ (Embedded Visual ...
    (microsoft.public.dotnet.framework.interop)
  • Re: cannot convert from object to system.array
    ... take session variable and set it to strArr ... "Egghead" wrote: ... > You need to put the session variable to a string array, ... >> Later, in my code, I need to set it and sort it. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: how to sort a array?
    ... I have a string array, for example @SampleArray, with the date and ... How to sort the array based on the date and time stamp. ... then push the first occurence into @1stOcc and push second occurance ...
    (comp.lang.perl.misc)
  • Re: Preferred method to class a form?
    ... Passing a wide string array to an API? ... The function that I'm trying to get working takes an empty ...
    (microsoft.public.vb.general.discussion)

Loading