Ignore:
Timestamp:
03/19/12 19:03:09 (12 years ago)
Author:
vmipsl
Message:

properties webmaster
dataProtocol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tapas/common/implementation/com/ether/EtherHelper.java

    r422 r423  
    8282    } 
    8383 
    84     // TODO : supprimer cette méthode et utiliser JSON pour récupérer pIdPIdList 
    85     @Nullable 
    86     public static <T1 extends Object, T2 extends Object> List<Pair<T1, T2>> extractpfIdPIdListFromString( @NotNull final String pfIdPIdArrayString, @NotNull final Class<T1> T1Class, @NotNull final Class<T2> T2Class ) 
    87     { 
    88         if( pfIdPIdArrayString.isEmpty() ) 
    89             return null; 
    90  
    91         final String[] pfIDPIdArray = pfIdPIdArrayString.split( "," ); 
    92         final List<Pair<T1, T2>> pfIdPIdList = new ArrayList<Pair<T1, T2>>( pfIDPIdArray.length ); 
    93         for( final String pfIdPId : pfIDPIdArray ) 
    94         { 
    95             final String[] pfIdPIdSplit = pfIdPId.split( "-" ); 
    96             final Pair<T1, T2> pfIdPIdPair = new Pair<T1, T2>(); 
    97             if( T1Class.equals( String.class ) ) 
    98                 pfIdPIdPair.setFirstValue( (T1) pfIdPIdSplit[0] ); 
    99             else 
    100                 pfIdPIdPair.setFirstValue( (T1) Integer.valueOf( pfIdPIdSplit[0] ) ); 
    101  
    102             if( T2Class.equals( String.class ) ) 
    103                 pfIdPIdPair.setSecondValue( (T2) pfIdPIdSplit[1] ); 
    104             else 
    105                 pfIdPIdPair.setSecondValue( (T2) Integer.valueOf( pfIdPIdSplit[1] ) ); 
    106             pfIdPIdList.add( pfIdPIdPair ); 
    107         } 
    108         return pfIdPIdList; 
    109     } 
    110  
    11184    /** 
    11285     * This method writes the text into the file filePath 
Note: See TracChangeset for help on using the changeset viewer.