idx
int64 0
41.2k
| question
stringlengths 74
4.04k
| target
stringlengths 7
750
|
|---|---|---|
2,000
|
public static base_response add ( nitro_service client , cmppolicylabel resource ) throws Exception { cmppolicylabel addresource = new cmppolicylabel ( ) ; addresource . labelname = resource . labelname ; addresource . type = resource . type ; return addresource . add_resource ( client ) ; }
|
Use this API to add cmppolicylabel .
|
2,001
|
public static base_responses add ( nitro_service client , cmppolicylabel resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { cmppolicylabel addresources [ ] = new cmppolicylabel [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new cmppolicylabel ( ) ; addresources [ i ] . labelname = resources [ i ] . labelname ; addresources [ i ] . type = resources [ i ] . type ; } result = add_bulk_request ( client , addresources ) ; } return result ; }
|
Use this API to add cmppolicylabel resources .
|
2,002
|
public static base_response rename ( nitro_service client , cmppolicylabel resource , String new_labelname ) throws Exception { cmppolicylabel renameresource = new cmppolicylabel ( ) ; renameresource . labelname = resource . labelname ; return renameresource . rename_resource ( client , new_labelname ) ; }
|
Use this API to rename a cmppolicylabel resource .
|
2,003
|
public static cmppolicylabel [ ] get ( nitro_service service ) throws Exception { cmppolicylabel obj = new cmppolicylabel ( ) ; cmppolicylabel [ ] response = ( cmppolicylabel [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the cmppolicylabel resources that are configured on netscaler .
|
2,004
|
public static cmppolicylabel get ( nitro_service service , String labelname ) throws Exception { cmppolicylabel obj = new cmppolicylabel ( ) ; obj . set_labelname ( labelname ) ; cmppolicylabel response = ( cmppolicylabel ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch cmppolicylabel resource of given name .
|
2,005
|
public static vpnvserver_vpnnexthopserver_binding [ ] get ( nitro_service service , String name ) throws Exception { vpnvserver_vpnnexthopserver_binding obj = new vpnvserver_vpnnexthopserver_binding ( ) ; obj . set_name ( name ) ; vpnvserver_vpnnexthopserver_binding response [ ] = ( vpnvserver_vpnnexthopserver_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch vpnvserver_vpnnexthopserver_binding resources of given name .
|
2,006
|
public static base_response expire ( nitro_service client , cacheobject resource ) throws Exception { cacheobject expireresource = new cacheobject ( ) ; expireresource . locator = resource . locator ; expireresource . url = resource . url ; expireresource . host = resource . host ; expireresource . port = resource . port ; expireresource . groupname = resource . groupname ; expireresource . httpmethod = resource . httpmethod ; return expireresource . perform_operation ( client , "expire" ) ; }
|
Use this API to expire cacheobject .
|
2,007
|
public static base_responses expire ( nitro_service client , cacheobject resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { cacheobject expireresources [ ] = new cacheobject [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { expireresources [ i ] = new cacheobject ( ) ; expireresources [ i ] . locator = resources [ i ] . locator ; expireresources [ i ] . url = resources [ i ] . url ; expireresources [ i ] . host = resources [ i ] . host ; expireresources [ i ] . port = resources [ i ] . port ; expireresources [ i ] . groupname = resources [ i ] . groupname ; expireresources [ i ] . httpmethod = resources [ i ] . httpmethod ; } result = perform_operation_bulk_request ( client , expireresources , "expire" ) ; } return result ; }
|
Use this API to expire cacheobject resources .
|
2,008
|
public static base_response flush ( nitro_service client , cacheobject resource ) throws Exception { cacheobject flushresource = new cacheobject ( ) ; flushresource . locator = resource . locator ; flushresource . url = resource . url ; flushresource . host = resource . host ; flushresource . port = resource . port ; flushresource . groupname = resource . groupname ; flushresource . httpmethod = resource . httpmethod ; flushresource . force = resource . force ; return flushresource . perform_operation ( client , "flush" ) ; }
|
Use this API to flush cacheobject .
|
2,009
|
public static base_responses flush ( nitro_service client , cacheobject resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { cacheobject flushresources [ ] = new cacheobject [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { flushresources [ i ] = new cacheobject ( ) ; flushresources [ i ] . locator = resources [ i ] . locator ; flushresources [ i ] . url = resources [ i ] . url ; flushresources [ i ] . host = resources [ i ] . host ; flushresources [ i ] . port = resources [ i ] . port ; flushresources [ i ] . groupname = resources [ i ] . groupname ; flushresources [ i ] . httpmethod = resources [ i ] . httpmethod ; flushresources [ i ] . force = resources [ i ] . force ; } result = perform_operation_bulk_request ( client , flushresources , "flush" ) ; } return result ; }
|
Use this API to flush cacheobject resources .
|
2,010
|
public static base_response save ( nitro_service client , cacheobject resource ) throws Exception { cacheobject saveresource = new cacheobject ( ) ; saveresource . locator = resource . locator ; return saveresource . perform_operation ( client , "save" ) ; }
|
Use this API to save cacheobject .
|
2,011
|
public static base_responses save ( nitro_service client , cacheobject resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { cacheobject saveresources [ ] = new cacheobject [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { saveresources [ i ] = new cacheobject ( ) ; saveresources [ i ] . locator = resources [ i ] . locator ; } result = perform_operation_bulk_request ( client , saveresources , "save" ) ; } return result ; }
|
Use this API to save cacheobject resources .
|
2,012
|
public static cacheobject [ ] get ( nitro_service service ) throws Exception { cacheobject obj = new cacheobject ( ) ; cacheobject [ ] response = ( cacheobject [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the cacheobject resources that are configured on netscaler .
|
2,013
|
public static cacheobject [ ] get ( nitro_service service , cacheobject_args args ) throws Exception { cacheobject obj = new cacheobject ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; cacheobject [ ] response = ( cacheobject [ ] ) obj . get_resources ( service , option ) ; return response ; }
|
Use this API to fetch all the cacheobject resources that are configured on netscaler . This uses cacheobject_args which is a way to provide additional arguments while fetching the resources .
|
2,014
|
public static sslpolicy_lbvserver_binding [ ] get ( nitro_service service , String name ) throws Exception { sslpolicy_lbvserver_binding obj = new sslpolicy_lbvserver_binding ( ) ; obj . set_name ( name ) ; sslpolicy_lbvserver_binding response [ ] = ( sslpolicy_lbvserver_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch sslpolicy_lbvserver_binding resources of given name .
|
2,015
|
public static cmppolicy_stats [ ] get ( nitro_service service ) throws Exception { cmppolicy_stats obj = new cmppolicy_stats ( ) ; cmppolicy_stats [ ] response = ( cmppolicy_stats [ ] ) obj . stat_resources ( service ) ; return response ; }
|
Use this API to fetch the statistics of all cmppolicy_stats resources that are configured on netscaler .
|
2,016
|
public static cmppolicy_stats get ( nitro_service service , String name ) throws Exception { cmppolicy_stats obj = new cmppolicy_stats ( ) ; obj . set_name ( name ) ; cmppolicy_stats response = ( cmppolicy_stats ) obj . stat_resource ( service ) ; return response ; }
|
Use this API to fetch statistics of cmppolicy_stats resource of given name .
|
2,017
|
public static appfwpolicylabel_stats [ ] get ( nitro_service service ) throws Exception { appfwpolicylabel_stats obj = new appfwpolicylabel_stats ( ) ; appfwpolicylabel_stats [ ] response = ( appfwpolicylabel_stats [ ] ) obj . stat_resources ( service ) ; return response ; }
|
Use this API to fetch the statistics of all appfwpolicylabel_stats resources that are configured on netscaler .
|
2,018
|
public static appfwpolicylabel_stats get ( nitro_service service , String labelname ) throws Exception { appfwpolicylabel_stats obj = new appfwpolicylabel_stats ( ) ; obj . set_labelname ( labelname ) ; appfwpolicylabel_stats response = ( appfwpolicylabel_stats ) obj . stat_resource ( service ) ; return response ; }
|
Use this API to fetch statistics of appfwpolicylabel_stats resource of given name .
|
2,019
|
public static base_response enable ( nitro_service client , nsfeature resource ) throws Exception { nsfeature enableresource = new nsfeature ( ) ; enableresource . feature = resource . feature ; return enableresource . perform_operation ( client , "enable" ) ; }
|
Use this API to enable nsfeature .
|
2,020
|
public static base_response disable ( nitro_service client , nsfeature resource ) throws Exception { nsfeature disableresource = new nsfeature ( ) ; disableresource . feature = resource . feature ; return disableresource . perform_operation ( client , "disable" ) ; }
|
Use this API to disable nsfeature .
|
2,021
|
public static nsfeature get ( nitro_service service ) throws Exception { nsfeature obj = new nsfeature ( ) ; nsfeature [ ] response = ( nsfeature [ ] ) obj . get_resources ( service ) ; return response [ 0 ] ; }
|
Use this API to fetch all the nsfeature resources that are configured on netscaler .
|
2,022
|
public static base_response update ( nitro_service client , nsrpcnode resource ) throws Exception { nsrpcnode updateresource = new nsrpcnode ( ) ; updateresource . ipaddress = resource . ipaddress ; updateresource . password = resource . password ; updateresource . srcip = resource . srcip ; updateresource . secure = resource . secure ; return updateresource . update_resource ( client ) ; }
|
Use this API to update nsrpcnode .
|
2,023
|
public static base_responses update ( nitro_service client , nsrpcnode resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { nsrpcnode updateresources [ ] = new nsrpcnode [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new nsrpcnode ( ) ; updateresources [ i ] . ipaddress = resources [ i ] . ipaddress ; updateresources [ i ] . password = resources [ i ] . password ; updateresources [ i ] . srcip = resources [ i ] . srcip ; updateresources [ i ] . secure = resources [ i ] . secure ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
|
Use this API to update nsrpcnode resources .
|
2,024
|
public static base_response unset ( nitro_service client , nsrpcnode resource , String [ ] args ) throws Exception { nsrpcnode unsetresource = new nsrpcnode ( ) ; unsetresource . ipaddress = resource . ipaddress ; return unsetresource . unset_resource ( client , args ) ; }
|
Use this API to unset the properties of nsrpcnode resource . Properties that need to be unset are specified in args array .
|
2,025
|
public static base_responses unset ( nitro_service client , String ipaddress [ ] , String args [ ] ) throws Exception { base_responses result = null ; if ( ipaddress != null && ipaddress . length > 0 ) { nsrpcnode unsetresources [ ] = new nsrpcnode [ ipaddress . length ] ; for ( int i = 0 ; i < ipaddress . length ; i ++ ) { unsetresources [ i ] = new nsrpcnode ( ) ; unsetresources [ i ] . ipaddress = ipaddress [ i ] ; } result = unset_bulk_request ( client , unsetresources , args ) ; } return result ; }
|
Use this API to unset the properties of nsrpcnode resources . Properties that need to be unset are specified in args array .
|
2,026
|
public static nsrpcnode [ ] get ( nitro_service service ) throws Exception { nsrpcnode obj = new nsrpcnode ( ) ; nsrpcnode [ ] response = ( nsrpcnode [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the nsrpcnode resources that are configured on netscaler .
|
2,027
|
public static nsrpcnode get ( nitro_service service , String ipaddress ) throws Exception { nsrpcnode obj = new nsrpcnode ( ) ; obj . set_ipaddress ( ipaddress ) ; nsrpcnode response = ( nsrpcnode ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch nsrpcnode resource of given name .
|
2,028
|
public static nsrpcnode [ ] get ( nitro_service service , String ipaddress [ ] ) throws Exception { if ( ipaddress != null && ipaddress . length > 0 ) { nsrpcnode response [ ] = new nsrpcnode [ ipaddress . length ] ; nsrpcnode obj [ ] = new nsrpcnode [ ipaddress . length ] ; for ( int i = 0 ; i < ipaddress . length ; i ++ ) { obj [ i ] = new nsrpcnode ( ) ; obj [ i ] . set_ipaddress ( ipaddress [ i ] ) ; response [ i ] = ( nsrpcnode ) obj [ i ] . get_resource ( service ) ; } return response ; } return null ; }
|
Use this API to fetch nsrpcnode resources of given names .
|
2,029
|
public double totalCount ( ) { if ( depth ( ) == 1 ) { return total ; } else { double result = 0.0 ; for ( K o : topLevelKeySet ( ) ) { result += conditionalizeOnce ( o ) . totalCount ( ) ; } return result ; } }
|
returns the total count of objects in the GeneralizedCounter .
|
2,030
|
private void printKeySet ( ) { Set < ? > keys = keySet ( ) ; System . out . println ( "printing keyset:" ) ; for ( Object o : keys ) { System . out . println ( o ) ; } }
|
below is testing code
|
2,031
|
public static autoscalepolicy_binding get ( nitro_service service , String name ) throws Exception { autoscalepolicy_binding obj = new autoscalepolicy_binding ( ) ; obj . set_name ( name ) ; autoscalepolicy_binding response = ( autoscalepolicy_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch autoscalepolicy_binding resource of given name .
|
2,032
|
public boolean isLabelAnnotationIntroducingCharacter ( char ch ) { char [ ] cutChars = labelAnnotationIntroducingCharacters ( ) ; for ( char cutChar : cutChars ) { if ( ch == cutChar ) { return true ; } } return false ; }
|
Say whether this character is an annotation introducing character .
|
2,033
|
public int [ ] getPositions ( ) { int [ ] list ; if ( assumeSinglePosition ) { list = new int [ 1 ] ; list [ 0 ] = super . startPosition ( ) ; return list ; } else { try { processEncodedPayload ( ) ; list = mtasPosition . getPositions ( ) ; if ( list != null ) { return mtasPosition . getPositions ( ) ; } } catch ( IOException e ) { log . debug ( e ) ; } int start = super . startPosition ( ) ; int end = super . endPosition ( ) ; list = new int [ end - start ] ; for ( int i = start ; i < end ; i ++ ) list [ i - start ] = i ; return list ; } }
|
Gets the positions .
|
2,034
|
private void processEncodedPayload ( ) throws IOException { if ( ! readPayload ) { payloadSpanCollector . reset ( ) ; collect ( payloadSpanCollector ) ; Collection < byte [ ] > originalPayloadCollection = payloadSpanCollector . getPayloads ( ) ; if ( originalPayloadCollection . iterator ( ) . hasNext ( ) ) { byte [ ] payload = originalPayloadCollection . iterator ( ) . next ( ) ; if ( payload == null ) { throw new IOException ( "no payload" ) ; } MtasPayloadDecoder payloadDecoder = new MtasPayloadDecoder ( ) ; payloadDecoder . init ( startPosition ( ) , payload ) ; mtasPosition = payloadDecoder . getMtasPosition ( ) ; } else { throw new IOException ( "no payload" ) ; } } }
|
Process encoded payload .
|
2,035
|
public static void main ( String [ ] args ) throws Exception { System . err . println ( "CRFBiasedClassifier invoked at " + new Date ( ) + " with arguments:" ) ; for ( String arg : args ) { System . err . print ( " " + arg ) ; } System . err . println ( ) ; Properties props = StringUtils . argsToProperties ( args ) ; CRFBiasedClassifier crf = new CRFBiasedClassifier ( props ) ; String testFile = crf . flags . testFile ; String loadPath = crf . flags . loadClassifier ; if ( loadPath != null ) { crf . loadClassifierNoExceptions ( loadPath , props ) ; } else if ( crf . flags . loadJarClassifier != null ) { crf . loadJarClassifier ( crf . flags . loadJarClassifier , props ) ; } else { crf . loadDefaultClassifier ( ) ; } if ( crf . flags . classBias != null ) { StringTokenizer biases = new java . util . StringTokenizer ( crf . flags . classBias , "," ) ; while ( biases . hasMoreTokens ( ) ) { StringTokenizer bias = new java . util . StringTokenizer ( biases . nextToken ( ) , ":" ) ; String cname = bias . nextToken ( ) ; double w = Double . parseDouble ( bias . nextToken ( ) ) ; crf . setBiasWeight ( cname , w ) ; System . err . println ( "Setting bias for class " + cname + " to " + w ) ; } } if ( testFile != null ) { DocumentReaderAndWriter readerAndWriter = crf . makeReaderAndWriter ( ) ; if ( crf . flags . printFirstOrderProbs ) { crf . printFirstOrderProbs ( testFile , readerAndWriter ) ; } else if ( crf . flags . printProbs ) { crf . printProbs ( testFile , readerAndWriter ) ; } else if ( crf . flags . useKBest ) { int k = crf . flags . kBest ; crf . classifyAndWriteAnswersKBest ( testFile , k , readerAndWriter ) ; } else { crf . classifyAndWriteAnswers ( testFile , readerAndWriter ) ; } } }
|
The main method which is essentially the same as in CRFClassifier . See the class documentation .
|
2,036
|
public static dnspolicy_dnsglobal_binding [ ] get ( nitro_service service , String name ) throws Exception { dnspolicy_dnsglobal_binding obj = new dnspolicy_dnsglobal_binding ( ) ; obj . set_name ( name ) ; dnspolicy_dnsglobal_binding response [ ] = ( dnspolicy_dnsglobal_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch dnspolicy_dnsglobal_binding resources of given name .
|
2,037
|
public static base_response add ( nitro_service client , snmpuser resource ) throws Exception { snmpuser addresource = new snmpuser ( ) ; addresource . name = resource . name ; addresource . group = resource . group ; addresource . authtype = resource . authtype ; addresource . authpasswd = resource . authpasswd ; addresource . privtype = resource . privtype ; addresource . privpasswd = resource . privpasswd ; return addresource . add_resource ( client ) ; }
|
Use this API to add snmpuser .
|
2,038
|
public static base_responses add ( nitro_service client , snmpuser resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { snmpuser addresources [ ] = new snmpuser [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new snmpuser ( ) ; addresources [ i ] . name = resources [ i ] . name ; addresources [ i ] . group = resources [ i ] . group ; addresources [ i ] . authtype = resources [ i ] . authtype ; addresources [ i ] . authpasswd = resources [ i ] . authpasswd ; addresources [ i ] . privtype = resources [ i ] . privtype ; addresources [ i ] . privpasswd = resources [ i ] . privpasswd ; } result = add_bulk_request ( client , addresources ) ; } return result ; }
|
Use this API to add snmpuser resources .
|
2,039
|
public static base_response update ( nitro_service client , snmpuser resource ) throws Exception { snmpuser updateresource = new snmpuser ( ) ; updateresource . name = resource . name ; updateresource . group = resource . group ; updateresource . authtype = resource . authtype ; updateresource . authpasswd = resource . authpasswd ; updateresource . privtype = resource . privtype ; updateresource . privpasswd = resource . privpasswd ; return updateresource . update_resource ( client ) ; }
|
Use this API to update snmpuser .
|
2,040
|
public static base_responses update ( nitro_service client , snmpuser resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { snmpuser updateresources [ ] = new snmpuser [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new snmpuser ( ) ; updateresources [ i ] . name = resources [ i ] . name ; updateresources [ i ] . group = resources [ i ] . group ; updateresources [ i ] . authtype = resources [ i ] . authtype ; updateresources [ i ] . authpasswd = resources [ i ] . authpasswd ; updateresources [ i ] . privtype = resources [ i ] . privtype ; updateresources [ i ] . privpasswd = resources [ i ] . privpasswd ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
|
Use this API to update snmpuser resources .
|
2,041
|
public static snmpuser [ ] get ( nitro_service service , options option ) throws Exception { snmpuser obj = new snmpuser ( ) ; snmpuser [ ] response = ( snmpuser [ ] ) obj . get_resources ( service , option ) ; return response ; }
|
Use this API to fetch all the snmpuser resources that are configured on netscaler .
|
2,042
|
public static snmpuser get ( nitro_service service , String name ) throws Exception { snmpuser obj = new snmpuser ( ) ; obj . set_name ( name ) ; snmpuser response = ( snmpuser ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch snmpuser resource of given name .
|
2,043
|
public static aaagroup_vpntrafficpolicy_binding [ ] get ( nitro_service service , String groupname ) throws Exception { aaagroup_vpntrafficpolicy_binding obj = new aaagroup_vpntrafficpolicy_binding ( ) ; obj . set_groupname ( groupname ) ; aaagroup_vpntrafficpolicy_binding response [ ] = ( aaagroup_vpntrafficpolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch aaagroup_vpntrafficpolicy_binding resources of given name .
|
2,044
|
public static Map < String , String > mapStringToMap ( String map ) { String [ ] m = map . split ( "[,;]" ) ; Map < String , String > res = new HashMap < String , String > ( ) ; for ( String str : m ) { int index = str . lastIndexOf ( '=' ) ; String key = str . substring ( 0 , index ) ; String val = str . substring ( index + 1 ) ; res . put ( key . trim ( ) , val . trim ( ) ) ; } return res ; }
|
Takes a string of the form x1 = y1 x2 = y2 ... and returns Map
|
2,045
|
public static String pad ( String str , int totalChars ) { if ( str == null ) { str = "null" ; } int slen = str . length ( ) ; StringBuilder sb = new StringBuilder ( str ) ; for ( int i = 0 ; i < totalChars - slen ; i ++ ) { sb . append ( ' ' ) ; } return sb . toString ( ) ; }
|
Return a String of length a minimum of totalChars characters by padding the input String str at the right end with spaces . If str is already longer than totalChars it is returned unchanged .
|
2,046
|
public static String padOrTrim ( String str , int num ) { if ( str == null ) { str = "null" ; } int leng = str . length ( ) ; if ( leng < num ) { StringBuilder sb = new StringBuilder ( str ) ; for ( int i = 0 ; i < num - leng ; i ++ ) { sb . append ( ' ' ) ; } return sb . toString ( ) ; } else if ( leng > num ) { return str . substring ( 0 , num ) ; } else { return str ; } }
|
Pad or trim so as to produce a string of exactly a certain length .
|
2,047
|
public static String padLeft ( String str , int totalChars , char ch ) { if ( str == null ) { str = "null" ; } StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 , num = totalChars - str . length ( ) ; i < num ; i ++ ) { sb . append ( ch ) ; } sb . append ( str ) ; return sb . toString ( ) ; }
|
Pads the given String to the left with the given character to ensure that it s at least totalChars long .
|
2,048
|
public static String trim ( String s , int maxWidth ) { if ( s . length ( ) <= maxWidth ) { return ( s ) ; } return ( s . substring ( 0 , maxWidth ) ) ; }
|
Returns s if it s at most maxWidth chars otherwise chops right side to fit .
|
2,049
|
public static String fileNameClean ( String s ) { char [ ] chars = s . toCharArray ( ) ; StringBuilder sb = new StringBuilder ( ) ; for ( char c : chars ) { if ( ( c >= 'A' && c <= 'Z' ) || ( c >= 'a' && c <= 'z' ) || ( c >= '0' && c <= '9' ) || ( c == '_' ) ) { sb . append ( c ) ; } else { if ( c == ' ' || c == '-' ) { sb . append ( '_' ) ; } else { sb . append ( 'x' ) . append ( ( int ) c ) . append ( 'x' ) ; } } } return sb . toString ( ) ; }
|
Returns a clean version of the given filename in which spaces have been converted to dashes and all non - alphanumeric chars are underscores .
|
2,050
|
public static String truncate ( int n , int smallestDigit , int biggestDigit ) { int numDigits = biggestDigit - smallestDigit + 1 ; char [ ] result = new char [ numDigits ] ; for ( int j = 1 ; j < smallestDigit ; j ++ ) { n = n / 10 ; } for ( int j = numDigits - 1 ; j >= 0 ; j -- ) { result [ j ] = Character . forDigit ( n % 10 , 10 ) ; n = n / 10 ; } return new String ( result ) ; }
|
This returns a string from decimal digit smallestDigit to decimal digit biggest digit . Smallest digit is labeled 1 and the limits are inclusive .
|
2,051
|
public static String checkRequiredProperties ( Properties props , String ... requiredProps ) { for ( String required : requiredProps ) { if ( props . getProperty ( required ) == null ) { return required ; } } return null ; }
|
If any of the given list of properties are not found returns the name of that property . Otherwise returns null .
|
2,052
|
public static void printToFile ( String filename , String message ) { printToFile ( new File ( filename ) , message , false ) ; }
|
Prints to a file . If the file does not exist rewrites the file ; does not append .
|
2,053
|
public static int longestCommonContiguousSubstring ( String s , String t ) { if ( s . length ( ) == 0 || t . length ( ) == 0 ) { return 0 ; } int M = s . length ( ) ; int N = t . length ( ) ; int [ ] [ ] d = new int [ M + 1 ] [ N + 1 ] ; for ( int j = 0 ; j <= N ; j ++ ) { d [ 0 ] [ j ] = 0 ; } for ( int i = 0 ; i <= M ; i ++ ) { d [ i ] [ 0 ] = 0 ; } int max = 0 ; for ( int i = 1 ; i <= M ; i ++ ) { for ( int j = 1 ; j <= N ; j ++ ) { if ( s . charAt ( i - 1 ) == t . charAt ( j - 1 ) ) { d [ i ] [ j ] = d [ i - 1 ] [ j - 1 ] + 1 ; } else { d [ i ] [ j ] = 0 ; } if ( d [ i ] [ j ] > max ) { max = d [ i ] [ j ] ; } } } return max ; }
|
Computes the longest common contiguous substring of s and t . The LCCS is the longest run of characters that appear consecutively in both s and t . For instance the LCCS of color and colour is 4 because of colo .
|
2,054
|
public static String pennPOSToWordnetPOS ( String s ) { if ( s . matches ( "NN|NNP|NNS|NNPS" ) ) { return "noun" ; } if ( s . matches ( "VB|VBD|VBG|VBN|VBZ|VBP|MD" ) ) { return "verb" ; } if ( s . matches ( "JJ|JJR|JJS|CD" ) ) { return "adjective" ; } if ( s . matches ( "RB|RBR|RBS|RP|WRB" ) ) { return "adverb" ; } return null ; }
|
Computes the WordNet 2 . 0 POS tag corresponding to the PTB POS tag s .
|
2,055
|
public static String getShortClassName ( Object o ) { String name = o . getClass ( ) . getName ( ) ; int index = name . lastIndexOf ( '.' ) ; if ( index >= 0 ) { name = name . substring ( index + 1 ) ; } return name ; }
|
Returns a short class name for an object . This is the class name stripped of any package name .
|
2,056
|
public static < T > T columnStringToObject ( Class objClass , String str , String delimiterRegex , String [ ] fieldNames ) throws InstantiationException , IllegalAccessException , NoSuchFieldException , NoSuchMethodException , InvocationTargetException { Pattern delimiterPattern = Pattern . compile ( delimiterRegex ) ; return StringUtils . < T > columnStringToObject ( objClass , str , delimiterPattern , fieldNames ) ; }
|
Converts a tab delimited string into an object with given fields Requires the object has setXxx functions for the specified fields
|
2,057
|
public static < T > T columnStringToObject ( Class < ? > objClass , String str , Pattern delimiterPattern , String [ ] fieldNames ) throws InstantiationException , IllegalAccessException , NoSuchMethodException , NoSuchFieldException , InvocationTargetException { String [ ] fields = delimiterPattern . split ( str ) ; T item = ErasureUtils . < T > uncheckedCast ( objClass . newInstance ( ) ) ; for ( int i = 0 ; i < fields . length ; i ++ ) { try { Field field = objClass . getDeclaredField ( fieldNames [ i ] ) ; field . set ( item , fields [ i ] ) ; } catch ( IllegalAccessException ex ) { Method method = objClass . getDeclaredMethod ( "set" + StringUtils . capitalize ( fieldNames [ i ] ) , String . class ) ; method . invoke ( item , fields [ i ] ) ; } } return item ; }
|
Converts a tab delimited string into an object with given fields Requires the object has public access for the specified fields
|
2,058
|
public static String objectToColumnString ( Object object , String delimiter , String [ ] fieldNames ) throws IllegalAccessException , NoSuchFieldException , NoSuchMethodException , InvocationTargetException { StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < fieldNames . length ; i ++ ) { if ( sb . length ( ) > 0 ) { sb . append ( delimiter ) ; } try { Field field = object . getClass ( ) . getDeclaredField ( fieldNames [ i ] ) ; sb . append ( field . get ( object ) ) ; } catch ( IllegalAccessException ex ) { Method method = object . getClass ( ) . getDeclaredMethod ( "get" + StringUtils . capitalize ( fieldNames [ i ] ) ) ; sb . append ( method . invoke ( object ) ) ; } } return sb . toString ( ) ; }
|
Converts an object into a tab delimited string with given fields Requires the object has public access for the specified fields
|
2,059
|
public static String makeHTMLTable ( String [ ] [ ] table , String [ ] rowLabels , String [ ] colLabels ) { StringBuilder buff = new StringBuilder ( ) ; buff . append ( "<table class=\"auto\" border=\"1\" cellspacing=\"0\">\n" ) ; buff . append ( "<tr>\n" ) ; buff . append ( "<td></td>\n" ) ; for ( int j = 0 ; j < table [ 0 ] . length ; j ++ ) { buff . append ( "<td class=\"label\">" ) . append ( colLabels [ j ] ) . append ( "</td>\n" ) ; } buff . append ( "</tr>\n" ) ; for ( int i = 0 ; i < table . length ; i ++ ) { buff . append ( "<tr>\n" ) ; buff . append ( "<td class=\"label\">" ) . append ( rowLabels [ i ] ) . append ( "</td>\n" ) ; for ( int j = 0 ; j < table [ i ] . length ; j ++ ) { buff . append ( "<td class=\"data\">" ) ; buff . append ( ( ( table [ i ] [ j ] != null ) ? table [ i ] [ j ] : "" ) ) ; buff . append ( "</td>\n" ) ; } buff . append ( "</tr>\n" ) ; } buff . append ( "</table>" ) ; return buff . toString ( ) ; }
|
Returns an HTML table containing the matrix of Strings passed in . The first dimension of the matrix should represent the rows and the second dimension the columns .
|
2,060
|
public static String makeAsciiTable ( Object [ ] [ ] table , Object [ ] rowLabels , Object [ ] colLabels , int padLeft , int padRight , boolean tsv ) { StringBuilder buff = new StringBuilder ( ) ; buff . append ( makeAsciiTableCell ( "" , padLeft , padRight , tsv ) ) ; for ( int j = 0 ; j < table [ 0 ] . length ; j ++ ) { buff . append ( makeAsciiTableCell ( colLabels [ j ] , padLeft , padRight , ( j != table [ 0 ] . length - 1 ) && tsv ) ) ; } buff . append ( '\n' ) ; for ( int i = 0 ; i < table . length ; i ++ ) { buff . append ( makeAsciiTableCell ( rowLabels [ i ] , padLeft , padRight , tsv ) ) ; for ( int j = 0 ; j < table [ i ] . length ; j ++ ) { buff . append ( makeAsciiTableCell ( table [ i ] [ j ] , padLeft , padRight , ( j != table [ 0 ] . length - 1 ) && tsv ) ) ; } buff . append ( '\n' ) ; } return buff . toString ( ) ; }
|
Returns an text table containing the matrix of Strings passed in . The first dimension of the matrix should represent the rows and the second dimension the columns .
|
2,061
|
private static String makeAsciiTableCell ( Object obj , int padLeft , int padRight , boolean tsv ) { String result = obj . toString ( ) ; if ( padLeft > 0 ) { result = padLeft ( result , padLeft ) ; } if ( padRight > 0 ) { result = pad ( result , padRight ) ; } if ( tsv ) { result = result + '\t' ; } return result ; }
|
The cell String is the string representation of the object . If padLeft is greater than 0 it is padded . Ditto right
|
2,062
|
public static void main ( String [ ] args ) { String [ ] s = { "there once was a man" , "this one is a manic" , "hey there" , "there once was a mane" , "once in a manger." , "where is one match?" , "Jo3seph Smarr!" , "Joseph R Smarr" } ; for ( int i = 0 ; i < 8 ; i ++ ) { for ( int j = 0 ; j < 8 ; j ++ ) { System . out . println ( "s1: " + s [ i ] ) ; System . out . println ( "s2: " + s [ j ] ) ; System . out . println ( "edit distance: " + editDistance ( s [ i ] , s [ j ] ) ) ; System . out . println ( "LCS: " + longestCommonSubstring ( s [ i ] , s [ j ] ) ) ; System . out . println ( "LCCS: " + longestCommonContiguousSubstring ( s [ i ] , s [ j ] ) ) ; System . out . println ( ) ; } } }
|
Tests the string edit distance function .
|
2,063
|
public static String chomp ( String s ) { if ( s . length ( ) == 0 ) return s ; int l_1 = s . length ( ) - 1 ; if ( s . charAt ( l_1 ) == '\n' ) { return s . substring ( 0 , l_1 ) ; } return s ; }
|
Returns the supplied string with any trailing \ n removed .
|
2,064
|
public static boolean isPunct ( String s ) { Pattern p = Pattern . compile ( "^[\\p{Punct}]+$" ) ; Matcher m = p . matcher ( s ) ; return m . matches ( ) ; }
|
Given a String the method uses Regex to check if the String only contains punctuation characters
|
2,065
|
public static authenticationvserver_auditnslogpolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { authenticationvserver_auditnslogpolicy_binding obj = new authenticationvserver_auditnslogpolicy_binding ( ) ; obj . set_name ( name ) ; authenticationvserver_auditnslogpolicy_binding response [ ] = ( authenticationvserver_auditnslogpolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch authenticationvserver_auditnslogpolicy_binding resources of given name .
|
2,066
|
public static servicegroup_lbmonitor_binding [ ] get ( nitro_service service , String servicegroupname ) throws Exception { servicegroup_lbmonitor_binding obj = new servicegroup_lbmonitor_binding ( ) ; obj . set_servicegroupname ( servicegroupname ) ; servicegroup_lbmonitor_binding response [ ] = ( servicegroup_lbmonitor_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch servicegroup_lbmonitor_binding resources of given name .
|
2,067
|
public static nstrafficdomain_bridgegroup_binding [ ] get ( nitro_service service , Long td ) throws Exception { nstrafficdomain_bridgegroup_binding obj = new nstrafficdomain_bridgegroup_binding ( ) ; obj . set_td ( td ) ; nstrafficdomain_bridgegroup_binding response [ ] = ( nstrafficdomain_bridgegroup_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch nstrafficdomain_bridgegroup_binding resources of given name .
|
2,068
|
public static long count ( nitro_service service , Long td ) throws Exception { nstrafficdomain_bridgegroup_binding obj = new nstrafficdomain_bridgegroup_binding ( ) ; obj . set_td ( td ) ; options option = new options ( ) ; option . set_count ( true ) ; nstrafficdomain_bridgegroup_binding response [ ] = ( nstrafficdomain_bridgegroup_binding [ ] ) obj . get_resources ( service , option ) ; if ( response != null ) { return response [ 0 ] . __count ; } return 0 ; }
|
Use this API to count nstrafficdomain_bridgegroup_binding resources configued on NetScaler .
|
2,069
|
public String toStringByValue ( ) { IntArrayList theKeys = new IntArrayList ( ) ; keysSortedByValue ( theKeys ) ; StringBuffer buf = new StringBuffer ( ) ; buf . append ( "[" ) ; int maxIndex = theKeys . size ( ) - 1 ; for ( int i = 0 ; i <= maxIndex ; i ++ ) { int key = theKeys . get ( i ) ; buf . append ( String . valueOf ( key ) ) ; buf . append ( "->" ) ; buf . append ( String . valueOf ( get ( key ) ) ) ; if ( i < maxIndex ) buf . append ( ", " ) ; } buf . append ( "]" ) ; return buf . toString ( ) ; }
|
Returns a string representation of the receiver containing the String representation of each key - value pair sorted ascending by value .
|
2,070
|
public static scpolicy_stats [ ] get ( nitro_service service ) throws Exception { scpolicy_stats obj = new scpolicy_stats ( ) ; scpolicy_stats [ ] response = ( scpolicy_stats [ ] ) obj . stat_resources ( service ) ; return response ; }
|
Use this API to fetch the statistics of all scpolicy_stats resources that are configured on netscaler .
|
2,071
|
public static scpolicy_stats get ( nitro_service service , String name ) throws Exception { scpolicy_stats obj = new scpolicy_stats ( ) ; obj . set_name ( name ) ; scpolicy_stats response = ( scpolicy_stats ) obj . stat_resource ( service ) ; return response ; }
|
Use this API to fetch statistics of scpolicy_stats resource of given name .
|
2,072
|
public static vpnvserver_vpnsessionpolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { vpnvserver_vpnsessionpolicy_binding obj = new vpnvserver_vpnsessionpolicy_binding ( ) ; obj . set_name ( name ) ; vpnvserver_vpnsessionpolicy_binding response [ ] = ( vpnvserver_vpnsessionpolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch vpnvserver_vpnsessionpolicy_binding resources of given name .
|
2,073
|
protected static void main ( String args [ ] ) { int from = Integer . parseInt ( args [ 0 ] ) ; int to = Integer . parseInt ( args [ 1 ] ) ; statistics ( from , to ) ; }
|
Tests correctness . Try from = 1000 to = 10000 from = 200 to = 1000 from = 16 to = 1000 from = 1000 to = Integer . MAX_VALUE
|
2,074
|
protected static void statistics ( int from , int to ) { for ( int i = 0 ; i < primeCapacities . length - 1 ; i ++ ) { if ( primeCapacities [ i ] >= primeCapacities [ i + 1 ] ) throw new RuntimeException ( "primes are unsorted or contain duplicates; detected at " + i + "@" + primeCapacities [ i ] ) ; } double accDeviation = 0.0 ; double maxDeviation = - 1.0 ; for ( int i = from ; i <= to ; i ++ ) { int primeCapacity = nextPrime ( i ) ; double deviation = ( primeCapacity - i ) / ( double ) i ; if ( deviation > maxDeviation ) { maxDeviation = deviation ; System . out . println ( "new maxdev @" + i + "@dev=" + maxDeviation ) ; } accDeviation += deviation ; } long width = 1 + ( long ) to - ( long ) from ; double meanDeviation = accDeviation / width ; System . out . println ( "Statistics for [" + from + "," + to + "] are as follows" ) ; System . out . println ( "meanDeviation = " + ( float ) meanDeviation * 100 + " %" ) ; System . out . println ( "maxDeviation = " + ( float ) maxDeviation * 100 + " %" ) ; }
|
Tests correctness .
|
2,075
|
public void readData ( BufferedReader in ) throws IOException { String line , value ; lexOptions . readData ( in ) ; line = in . readLine ( ) ; value = line . substring ( line . indexOf ( ' ' ) + 1 ) ; try { tlpParams = ( TreebankLangParserParams ) Class . forName ( value ) . newInstance ( ) ; } catch ( Exception e ) { IOException ioe = new IOException ( "Problem instantiating parserParams: " + line ) ; ioe . initCause ( e ) ; throw ioe ; } line = in . readLine ( ) ; if ( line . matches ( "^forceCNF.*" ) ) { value = line . substring ( line . indexOf ( ' ' ) + 1 ) ; forceCNF = Boolean . parseBoolean ( value ) ; line = in . readLine ( ) ; } value = line . substring ( line . indexOf ( ' ' ) + 1 ) ; doPCFG = Boolean . parseBoolean ( value ) ; line = in . readLine ( ) ; value = line . substring ( line . indexOf ( ' ' ) + 1 ) ; doDep = Boolean . parseBoolean ( value ) ; line = in . readLine ( ) ; value = line . substring ( line . indexOf ( ' ' ) + 1 ) ; freeDependencies = Boolean . parseBoolean ( value ) ; line = in . readLine ( ) ; value = line . substring ( line . indexOf ( ' ' ) + 1 ) ; directional = Boolean . parseBoolean ( value ) ; line = in . readLine ( ) ; value = line . substring ( line . indexOf ( ' ' ) + 1 ) ; genStop = Boolean . parseBoolean ( value ) ; line = in . readLine ( ) ; value = line . substring ( line . indexOf ( ' ' ) + 1 ) ; distance = Boolean . parseBoolean ( value ) ; line = in . readLine ( ) ; value = line . substring ( line . indexOf ( ' ' ) + 1 ) ; coarseDistance = Boolean . parseBoolean ( value ) ; line = in . readLine ( ) ; value = line . substring ( line . indexOf ( ' ' ) + 1 ) ; dcTags = Boolean . parseBoolean ( value ) ; line = in . readLine ( ) ; if ( ! line . matches ( "^nPrune.*" ) ) { throw new RuntimeException ( "Expected nPrune, found: " + line ) ; } value = line . substring ( line . indexOf ( ' ' ) + 1 ) ; nodePrune = Boolean . parseBoolean ( value ) ; line = in . readLine ( ) ; if ( line . length ( ) != 0 ) { throw new RuntimeException ( "Expected blank line, found: " + line ) ; } }
|
Populates data in this Options from the character stream .
|
2,076
|
public static protocolip_stats get ( nitro_service service ) throws Exception { protocolip_stats obj = new protocolip_stats ( ) ; protocolip_stats [ ] response = ( protocolip_stats [ ] ) obj . stat_resources ( service ) ; return response [ 0 ] ; }
|
Use this API to fetch the statistics of all protocolip_stats resources that are configured on netscaler .
|
2,077
|
public static < E > Filter < E > switchedFilter ( Filter < E > filter , boolean negated ) { return ( new NegatedFilter < E > ( filter , negated ) ) ; }
|
Filter that s either negated or normal as specified .
|
2,078
|
@ SuppressWarnings ( "unchecked" ) public static < E > E [ ] filter ( E [ ] elems , Filter < E > filter ) { List < E > filtered = new ArrayList < E > ( ) ; for ( E elem : elems ) { if ( filter . accept ( elem ) ) { filtered . add ( elem ) ; } } return ( filtered . toArray ( ( E [ ] ) Array . newInstance ( elems . getClass ( ) . getComponentType ( ) , filtered . size ( ) ) ) ) ; }
|
Applies the given filter to each of the given elems and returns the list of elems that were accepted . The runtime type of the returned array is the same as the passed in array .
|
2,079
|
public static < E > void retainAll ( Collection < E > elems , Filter < ? super E > filter ) { for ( Iterator < E > iter = elems . iterator ( ) ; iter . hasNext ( ) ; ) { E elem = iter . next ( ) ; if ( ! filter . accept ( elem ) ) { iter . remove ( ) ; } } }
|
Removes all elems in the given Collection that aren t accepted by the given Filter .
|
2,080
|
public static appflowpolicy_binding get ( nitro_service service , String name ) throws Exception { appflowpolicy_binding obj = new appflowpolicy_binding ( ) ; obj . set_name ( name ) ; appflowpolicy_binding response = ( appflowpolicy_binding ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch appflowpolicy_binding resource of given name .
|
2,081
|
public static hanode_routemonitor_binding [ ] get ( nitro_service service , Long id ) throws Exception { hanode_routemonitor_binding obj = new hanode_routemonitor_binding ( ) ; obj . set_id ( id ) ; hanode_routemonitor_binding response [ ] = ( hanode_routemonitor_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch hanode_routemonitor_binding resources of given name .
|
2,082
|
public static base_response add ( nitro_service client , dnsview resource ) throws Exception { dnsview addresource = new dnsview ( ) ; addresource . viewname = resource . viewname ; return addresource . add_resource ( client ) ; }
|
Use this API to add dnsview .
|
2,083
|
public static base_responses add ( nitro_service client , dnsview resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { dnsview addresources [ ] = new dnsview [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new dnsview ( ) ; addresources [ i ] . viewname = resources [ i ] . viewname ; } result = add_bulk_request ( client , addresources ) ; } return result ; }
|
Use this API to add dnsview resources .
|
2,084
|
public static base_response delete ( nitro_service client , String viewname ) throws Exception { dnsview deleteresource = new dnsview ( ) ; deleteresource . viewname = viewname ; return deleteresource . delete_resource ( client ) ; }
|
Use this API to delete dnsview of given name .
|
2,085
|
public static dnsview [ ] get ( nitro_service service ) throws Exception { dnsview obj = new dnsview ( ) ; dnsview [ ] response = ( dnsview [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the dnsview resources that are configured on netscaler .
|
2,086
|
public static dnsview get ( nitro_service service , String viewname ) throws Exception { dnsview obj = new dnsview ( ) ; obj . set_viewname ( viewname ) ; dnsview response = ( dnsview ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch dnsview resource of given name .
|
2,087
|
public static dnsview [ ] get ( nitro_service service , String viewname [ ] ) throws Exception { if ( viewname != null && viewname . length > 0 ) { dnsview response [ ] = new dnsview [ viewname . length ] ; dnsview obj [ ] = new dnsview [ viewname . length ] ; for ( int i = 0 ; i < viewname . length ; i ++ ) { obj [ i ] = new dnsview ( ) ; obj [ i ] . set_viewname ( viewname [ i ] ) ; response [ i ] = ( dnsview ) obj [ i ] . get_resource ( service ) ; } return response ; } return null ; }
|
Use this API to fetch dnsview resources of given names .
|
2,088
|
public static base_response add ( nitro_service client , onlinkipv6prefix resource ) throws Exception { onlinkipv6prefix addresource = new onlinkipv6prefix ( ) ; addresource . ipv6prefix = resource . ipv6prefix ; addresource . onlinkprefix = resource . onlinkprefix ; addresource . autonomusprefix = resource . autonomusprefix ; addresource . depricateprefix = resource . depricateprefix ; addresource . decrementprefixlifetimes = resource . decrementprefixlifetimes ; addresource . prefixvalidelifetime = resource . prefixvalidelifetime ; addresource . prefixpreferredlifetime = resource . prefixpreferredlifetime ; return addresource . add_resource ( client ) ; }
|
Use this API to add onlinkipv6prefix .
|
2,089
|
public static base_responses add ( nitro_service client , onlinkipv6prefix resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { onlinkipv6prefix addresources [ ] = new onlinkipv6prefix [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new onlinkipv6prefix ( ) ; addresources [ i ] . ipv6prefix = resources [ i ] . ipv6prefix ; addresources [ i ] . onlinkprefix = resources [ i ] . onlinkprefix ; addresources [ i ] . autonomusprefix = resources [ i ] . autonomusprefix ; addresources [ i ] . depricateprefix = resources [ i ] . depricateprefix ; addresources [ i ] . decrementprefixlifetimes = resources [ i ] . decrementprefixlifetimes ; addresources [ i ] . prefixvalidelifetime = resources [ i ] . prefixvalidelifetime ; addresources [ i ] . prefixpreferredlifetime = resources [ i ] . prefixpreferredlifetime ; } result = add_bulk_request ( client , addresources ) ; } return result ; }
|
Use this API to add onlinkipv6prefix resources .
|
2,090
|
public static base_response delete ( nitro_service client , String ipv6prefix ) throws Exception { onlinkipv6prefix deleteresource = new onlinkipv6prefix ( ) ; deleteresource . ipv6prefix = ipv6prefix ; return deleteresource . delete_resource ( client ) ; }
|
Use this API to delete onlinkipv6prefix of given name .
|
2,091
|
public static base_response update ( nitro_service client , onlinkipv6prefix resource ) throws Exception { onlinkipv6prefix updateresource = new onlinkipv6prefix ( ) ; updateresource . ipv6prefix = resource . ipv6prefix ; updateresource . onlinkprefix = resource . onlinkprefix ; updateresource . autonomusprefix = resource . autonomusprefix ; updateresource . depricateprefix = resource . depricateprefix ; updateresource . decrementprefixlifetimes = resource . decrementprefixlifetimes ; updateresource . prefixvalidelifetime = resource . prefixvalidelifetime ; updateresource . prefixpreferredlifetime = resource . prefixpreferredlifetime ; return updateresource . update_resource ( client ) ; }
|
Use this API to update onlinkipv6prefix .
|
2,092
|
public static base_responses update ( nitro_service client , onlinkipv6prefix resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { onlinkipv6prefix updateresources [ ] = new onlinkipv6prefix [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i ] = new onlinkipv6prefix ( ) ; updateresources [ i ] . ipv6prefix = resources [ i ] . ipv6prefix ; updateresources [ i ] . onlinkprefix = resources [ i ] . onlinkprefix ; updateresources [ i ] . autonomusprefix = resources [ i ] . autonomusprefix ; updateresources [ i ] . depricateprefix = resources [ i ] . depricateprefix ; updateresources [ i ] . decrementprefixlifetimes = resources [ i ] . decrementprefixlifetimes ; updateresources [ i ] . prefixvalidelifetime = resources [ i ] . prefixvalidelifetime ; updateresources [ i ] . prefixpreferredlifetime = resources [ i ] . prefixpreferredlifetime ; } result = update_bulk_request ( client , updateresources ) ; } return result ; }
|
Use this API to update onlinkipv6prefix resources .
|
2,093
|
public static base_response unset ( nitro_service client , onlinkipv6prefix resource , String [ ] args ) throws Exception { onlinkipv6prefix unsetresource = new onlinkipv6prefix ( ) ; unsetresource . ipv6prefix = resource . ipv6prefix ; return unsetresource . unset_resource ( client , args ) ; }
|
Use this API to unset the properties of onlinkipv6prefix resource . Properties that need to be unset are specified in args array .
|
2,094
|
public static base_responses unset ( nitro_service client , onlinkipv6prefix resources [ ] , String [ ] args ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { onlinkipv6prefix unsetresources [ ] = new onlinkipv6prefix [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { unsetresources [ i ] = new onlinkipv6prefix ( ) ; unsetresources [ i ] . ipv6prefix = resources [ i ] . ipv6prefix ; } result = unset_bulk_request ( client , unsetresources , args ) ; } return result ; }
|
Use this API to unset the properties of onlinkipv6prefix resources . Properties that need to be unset are specified in args array .
|
2,095
|
public static onlinkipv6prefix [ ] get ( nitro_service service ) throws Exception { onlinkipv6prefix obj = new onlinkipv6prefix ( ) ; onlinkipv6prefix [ ] response = ( onlinkipv6prefix [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch all the onlinkipv6prefix resources that are configured on netscaler .
|
2,096
|
public static onlinkipv6prefix get ( nitro_service service , String ipv6prefix ) throws Exception { onlinkipv6prefix obj = new onlinkipv6prefix ( ) ; obj . set_ipv6prefix ( ipv6prefix ) ; onlinkipv6prefix response = ( onlinkipv6prefix ) obj . get_resource ( service ) ; return response ; }
|
Use this API to fetch onlinkipv6prefix resource of given name .
|
2,097
|
public static onlinkipv6prefix [ ] get ( nitro_service service , String ipv6prefix [ ] ) throws Exception { if ( ipv6prefix != null && ipv6prefix . length > 0 ) { onlinkipv6prefix response [ ] = new onlinkipv6prefix [ ipv6prefix . length ] ; onlinkipv6prefix obj [ ] = new onlinkipv6prefix [ ipv6prefix . length ] ; for ( int i = 0 ; i < ipv6prefix . length ; i ++ ) { obj [ i ] = new onlinkipv6prefix ( ) ; obj [ i ] . set_ipv6prefix ( ipv6prefix [ i ] ) ; response [ i ] = ( onlinkipv6prefix ) obj [ i ] . get_resource ( service ) ; } return response ; } return null ; }
|
Use this API to fetch onlinkipv6prefix resources of given names .
|
2,098
|
public static vpnsessionpolicy_aaauser_binding [ ] get ( nitro_service service , String name ) throws Exception { vpnsessionpolicy_aaauser_binding obj = new vpnsessionpolicy_aaauser_binding ( ) ; obj . set_name ( name ) ; vpnsessionpolicy_aaauser_binding response [ ] = ( vpnsessionpolicy_aaauser_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch vpnsessionpolicy_aaauser_binding resources of given name .
|
2,099
|
public static vpnvserver_authenticationradiuspolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { vpnvserver_authenticationradiuspolicy_binding obj = new vpnvserver_authenticationradiuspolicy_binding ( ) ; obj . set_name ( name ) ; vpnvserver_authenticationradiuspolicy_binding response [ ] = ( vpnvserver_authenticationradiuspolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; }
|
Use this API to fetch vpnvserver_authenticationradiuspolicy_binding resources of given name .
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.