idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
142,500
public void releaseMailAccountForThread ( final String accountReservationKey ) { lock . lock ( ) ; try { MailAccount mailAccount = lookupUsedMailAccountForCurrentThread ( accountReservationKey ) ; releaseMailAccountForThread ( mailAccount ) ; } finally { lock . unlock ( ) ; } }
Releases the mail account reserved under the specified reservation key for the current thread so it can be reused by another threads . Threads blocking on an attempt to reserved an account are notified .
142,501
public static MozuUrl addProductSortDefinitionUrl ( String responseFields , Boolean useProvidedId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/productsortdefinitions/?useProvidedId={useProvidedId}&responseFields={responseFields}" ) ; formatter . formatUrl ( "responseFields" , responseFie...
Get Resource Url for AddProductSortDefinition
142,502
public static MozuUrl updateProductSortDefinitionUrl ( Integer productSortDefinitionId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/productsortdefinitions/{productSortDefinitionId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "productSortDefinition...
Get Resource Url for UpdateProductSortDefinition
142,503
public static MozuUrl deleteProductSortDefinitionUrl ( Integer productSortDefinitionId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/productsortdefinitions/{productSortDefinitionId}" ) ; formatter . formatUrl ( "productSortDefinitionId" , productSortDefinitionId ) ; return new MozuUrl ( f...
Get Resource Url for DeleteProductSortDefinition
142,504
public boolean hasNextCase ( ) { for ( ConstraintWrap wrap : summands ) { if ( wrap . constraint . hasNextCase ( ) ) { return true ; } } return false ; }
Returns true if one of the sub - constraints still contains mandatory cases
142,505
public synchronized void registerHandler ( Object handler ) { boolean validClass = false ; if ( handler == null ) { throw new IllegalArgumentException ( "Null handler class" ) ; } Class < ? > clazz = handler . getClass ( ) ; Class < ? > interfaces [ ] = clazz . getInterfaces ( ) ; for ( int i = 0 ; i < interfaces . len...
Register an event handler . The registration looks at the interfaces that the handler implements . An entry is created in the event handler map for each event interface that is implemented .
142,506
public void merge ( OrderedIntDoubleMapping updates , DoubleDoubleFunction func ) { int [ ] updateIndices = updates . getIndices ( ) ; double [ ] updateValues = updates . getValues ( ) ; int newNumMappings = numMappings + updates . getNumMappings ( ) ; int newCapacity = Math . max ( ( int ) ( 1.2 * newNumMappings ) , n...
Merges the updates in linear time by allocating new arrays and iterating through the existing indices and values and the updates indices and values at the same time while selecting the minimum index to set at each step .
142,507
public Field createField ( final MathRandom random , final Element element , final String characterSetId ) { Field field = null ; Element fieldElement = null ; Element fieldRefElement = element . getChild ( XMLTags . FIELD_REF ) ; if ( fieldRefElement != null ) { fieldElement = getElementFinder ( element ) . findElemen...
Searches for the Field Child tag in the specified element or takes the Field_Ref Tag and generates a new field instance based on the tag data . So this method has to be called with an element as parameter that contains a field or a field_ref element respectively .
142,508
private Class < ? extends Field > getClassObject ( final Element element ) { String className = element . getAttributeValue ( XMLTags . CLASS ) ; Class < ? extends Field > classObject = null ; try { className = className . indexOf ( '.' ) > 0 ? className : getClass ( ) . getPackage ( ) . getName ( ) + '.' + className ;...
This method returns the class object from which a new instance shall be generated . To achieve this the class attribute of the passed element is taken to determine the class name .
142,509
public static PointLocation parsePointLocation ( final String representation ) throws ParserException { if ( StringUtils . isBlank ( representation ) ) { throw new ParserException ( "No point location value provided" ) ; } if ( ! StringUtils . endsWith ( representation , "/" ) ) { throw new ParserException ( "Point loc...
Parses a string representation of the point location .
142,510
public static MozuUrl getPropertyValueLocalizedContentsUrl ( String attributeFQN , String productCode , String value ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/products/{productCode}/Properties/{attributeFQN}/values/{value}/LocalizedContent" ) ; formatter . formatUrl ( "attributeFQN" ,...
Get Resource Url for GetPropertyValueLocalizedContents
142,511
public static MozuUrl deletePropertyUrl ( String attributeFQN , String productCode ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/products/{productCode}/Properties/{attributeFQN}" ) ; formatter . formatUrl ( "attributeFQN" , attributeFQN ) ; formatter . formatUrl ( "productCode" , productC...
Get Resource Url for DeleteProperty
142,512
public static MozuUrl getProductsUrl ( String cursorMark , String defaultSort , String filter , Integer pageSize , String responseFields , String responseOptions , String sortBy , Integer startIndex ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/storefront/products/?filter={filter}&startIndex={s...
Get Resource Url for GetProducts
142,513
public static MozuUrl getProductInventoryUrl ( String locationCodes , String productCode , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/storefront/products/{productCode}/locationinventory?locationCodes={locationCodes}&responseFields={responseFields}" ) ; formatter . forma...
Get Resource Url for GetProductInventory
142,514
public static MozuUrl getProductUrl ( Boolean acceptVariantProductCode , Boolean allowInactive , String productCode , String purchaseLocation , Integer quantity , String responseFields , Boolean skipInventoryCheck , Boolean supressOutOfStock404 , String variationProductCode , String variationProductCodeFilter ) { UrlFo...
Get Resource Url for GetProduct
142,515
public static MozuUrl getProductForIndexingUrl ( DateTime lastModifiedDate , String productCode , Long productVersion , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/storefront/products/indexing/{productCode}?productVersion={productVersion}&lastModifiedDate={lastModifiedDa...
Get Resource Url for GetProductForIndexing
142,516
public static MozuUrl configuredProductUrl ( Boolean includeOptionDetails , String productCode , String purchaseLocation , Integer quantity , String responseFields , Boolean skipInventoryCheck , String variationProductCodeFilter ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/storefront/products/...
Get Resource Url for ConfiguredProduct
142,517
public static MozuUrl validateProductUrl ( String productCode , String purchaseLocation , Integer quantity , String responseFields , Boolean skipDefaults , Boolean skipInventoryCheck ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/storefront/products/{productCode}/validate?skipInventoryCheck={ski...
Get Resource Url for ValidateProduct
142,518
public static MozuUrl validateDiscountsUrl ( Boolean allowInactive , Integer customerAccountId , String productCode , String responseFields , Boolean skipInventoryCheck , String variationProductCode ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/storefront/products/{productCode}/validateDiscount...
Get Resource Url for ValidateDiscounts
142,519
public static MozuUrl getLocationInventoryUrl ( String locationCode , String productCode , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/locationinventory/{locationCode}/{productCode}?responseFields={responseFields}" ) ; formatter . formatUrl ( "locationCode" , locat...
Get Resource Url for GetLocationInventory
142,520
public static MozuUrl addLocationInventoryUrl ( String locationCode , Boolean performUpserts ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/locationinventory/{locationCode}?performUpserts={performUpserts}" ) ; formatter . formatUrl ( "locationCode" , locationCode ) ; formatter . formatUrl ...
Get Resource Url for AddLocationInventory
142,521
public static MozuUrl deleteLocationInventoryUrl ( String locationCode , String productCode ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/locationinventory/{locationCode}/{productCode}" ) ; formatter . formatUrl ( "locationCode" , locationCode ) ; formatter . formatUrl ( "productCode" , p...
Get Resource Url for DeleteLocationInventory
142,522
public static MozuUrl getOrderNotesUrl ( String orderId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/notes" ) ; formatter . formatUrl ( "orderId" , orderId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetOrderNotes
142,523
public static MozuUrl getOrderNoteUrl ( String noteId , String orderId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/notes/{noteId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "noteId" , noteId ) ; formatter . formatUrl ( "orderId" , orderId ) ;...
Get Resource Url for GetOrderNote
142,524
public static MozuUrl deleteOrderNoteUrl ( String noteId , String orderId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/notes/{noteId}" ) ; formatter . formatUrl ( "noteId" , noteId ) ; formatter . formatUrl ( "orderId" , orderId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) ...
Get Resource Url for DeleteOrderNote
142,525
public Set < String > getContainedIds ( ) { Set < String > s = super . getContainedIds ( ) ; s . addAll ( constraint . getContainedIds ( ) ) ; return s ; }
Returns the set of constained ids . This Set contains all ids of the embedded constraint plus its own if this is set .
142,526
private void purgeSmsOlderThan ( final Date date ) { logger . debug ( "Starting purge of SMS table with parameter : \n" + " - date : " + date ) ; final int nbSmsDeleted = daoService . deleteSmsOlderThan ( date ) ; logger . debug ( "End purge of SMS table, result : \n" + " - number of sms deleted : " + nbSmsDeleted ) ; ...
Purge the Sms in db with date older than the specified date .
142,527
public static MozuUrl updateExtendedPropertyUrl ( String key , String responseFields , Boolean upsert ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/carts/current/extendedproperties/{key}?upsert={upsert}&responseFields={responseFields}" ) ; formatter . formatUrl ( "key" , key ) ; formatter . formatUrl (...
Get Resource Url for UpdateExtendedProperty
142,528
public static MozuUrl updateExtendedPropertiesUrl ( Boolean upsert ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/carts/current/extendedproperties?upsert={upsert}" ) ; formatter . formatUrl ( "upsert" , upsert ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD )...
Get Resource Url for UpdateExtendedProperties
142,529
public static MozuUrl deleteExtendedPropertiesUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/carts/current/extendedproperties" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteExtendedProperties
142,530
protected String initValuesImpl ( final FieldCase ca ) { if ( ca == FieldCase . NULL || ca == FieldCase . BLANK ) { return null ; } String s = super . initValuesImpl ( ca ) ; int counter = 10000 ; while ( set . contains ( s ) && counter > 0 ) { s = super . initValuesImpl ( ca ) ; counter -- ; } if ( counter == 0 ) { th...
Calls initValuesImpl on the super class . If the returned value is already in the list of values initValuesImpl is called again . This happens up to 10000 times . If a new value is found it is stored in the set .
142,531
public int getMaxLength ( ) { int max = - 1 ; for ( Constraint c : constraints ) { int cM = c . getMaxLength ( ) ; if ( max < cM ) { max = cM ; } } return max ; }
Returns the maximum of all embedded constraints .
142,532
public String initValues ( final FieldCase ca ) { if ( ca != null ) { for ( Constraint c : constraints ) { c . resetValues ( ) ; } } for ( Constraint c : constraints ) { c . initValues ( ca ) ; } return null ; }
Initializes all subconstraints .
142,533
public void resetValues ( ) { int length = constraints . size ( ) ; for ( int i = length - 1 ; i >= 0 ; i -- ) { Constraint c = constraints . get ( i ) ; c . resetValues ( ) ; if ( dependent && c . hasNextCase ( ) ) { for ( int j = i + 1 ; j < length ; j ++ ) { constraints . get ( j ) . resetCase ( ) ; } break ; } } }
Resets the values of the sub - constraints . To achieve this the list of sub - constraints is passed backwards . If all sub - constraints are independent of each other simply all sub - constraints will be reset . However if they are dependent the case of all constraints in the list below the first constraint which stil...
142,534
public char [ ] getCharacters ( final int size , final int bad ) { if ( size == 0 ) { return new char [ 0 ] ; } char [ ] chars = new char [ size ] ; for ( int i = 0 ; i < chars . length ; i ++ ) { chars [ i ] = field . getAllowedCharacter ( ) ; } for ( int i = 0 ; i < 10 && Character . isSpaceChar ( chars [ 0 ] ) ; i +...
Returns size characters in an array . If bad is set to true at least half of all the characters will be set to a forbidden character .
142,535
public static MozuUrl getThirdPartyPaymentWorkflowWithValuesUrl ( String fullyQualifiedName , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/settings/checkout/paymentsettings/thirdpartyworkflow/{fullyQualifiedName}?responseFields={responseFields}" ) ; formatter . formatUrl ( "fully...
Get Resource Url for GetThirdPartyPaymentWorkflowWithValues
142,536
public static MozuUrl getThirdPartyPaymentWorkflowsUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/settings/checkout/paymentsettings/thirdpartyworkflows" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetThirdPartyPaymentWorkflows
142,537
public static MozuUrl addThirdPartyPaymentWorkflowUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/settings/checkout/paymentsettings/thirdpartyworkflows" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for AddThirdPartyPaymentWorkflow
142,538
public static MozuUrl deleteThirdPartyPaymentWorkflowUrl ( String fullyQualifiedName ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/settings/checkout/paymentsettings/thirdpartyworkflows/{fullyQualifiedName}" ) ; formatter . formatUrl ( "fullyQualifiedName" , fullyQualifiedName ) ; return new MozuUrl ( f...
Get Resource Url for DeleteThirdPartyPaymentWorkflow
142,539
public static MozuUrl getAvailableDigitalPackageFulfillmentActionsUrl ( String digitalPackageId , String orderId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/digitalpackages/{digitalPackageId}/actions" ) ; formatter . formatUrl ( "digitalPackageId" , digitalPackageId ) ; formatter . f...
Get Resource Url for GetAvailableDigitalPackageFulfillmentActions
142,540
public static MozuUrl getDigitalPackageUrl ( String digitalPackageId , String orderId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/orders/{orderId}/digitalpackages/{digitalPackageId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "digitalPackageId" , digitalPackag...
Get Resource Url for GetDigitalPackage
142,541
public Reporter registerReporter ( final Reporter reporter ) { injector . injectMembers ( reporter ) ; reporters . add ( reporter ) ; return reporter ; }
Registers a reporter .
142,542
public File chooseFile ( final String fileKey ) { log . debug ( "Opening file chooser dialog" ) ; JFileChooser fileChooser = new JFileChooser ( System . getProperty ( JFunkConstants . USER_DIR ) ) ; fileChooser . setFileSelectionMode ( JFileChooser . FILES_AND_DIRECTORIES ) ; fileChooser . setPreferredSize ( new Dimens...
Opens a file chooser dialog which can then be used to choose a file or directory and assign the path of the chosen object to a variable . The name of the variable must be passed as a parameter .
142,543
public String chooseRandom ( final String propertyKey , final List < String > randomValues ) { Randomizable < String > choice = new RandomCollection < > ( random , randomValues ) ; String currentValue = choice . get ( ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "Chosen value: " + currentValue ) ; } currentValue...
Randomly selects an item from a list of Strings . List items may contain placeholder tokens . The result is stored in the configuration under the specified key and also returned by this method .
142,544
public void module ( final String moduleName , final Map < ? , ? > attributes , final Closure < Void > closure ) { moduleBuilderProvider . get ( ) . invokeMethod ( "module" , newArrayList ( moduleName , attributes , closure ) ) ; }
Creates and runs a dynamic script module .
142,545
public void onError ( final Closure < Void > closure ) { int errorCount = errors . size ( ) ; if ( errorCount > 0 ) { log . info ( errorCount + " error" + ( errorCount == 1 ? "" : "s" ) + " in list ) ; closure . call ( ) ; log . info ( "Finished OnError block" ) ; } else { log . info ( "No errors in list ) ; } }
Executes the specified closure if at least one exception had previously been recorded in the currently executing script .
142,546
public void optional ( final Closure < Void > closure ) { log . info ( "Executing optional block ..." ) ; try { closure . call ( ) ; } catch ( final Exception ex ) { log . error ( "Exception executing optional block: " + ex . getMessage ( ) , ex ) ; errors . add ( ex ) ; } catch ( AssertionError err ) { log . error ( "...
Runs the specified closure catching any exception that might occur during execution .
142,547
public void processCsvFile ( final String csvFile , final String delimiter , final char quoteChar , final Charset charset , final Closure < Void > closure ) { File f = new File ( csvFile ) ; try { config . extractFromArchive ( f , true ) ; checkState ( f . exists ( ) , "CSV file not found: " + f ) ; Reader reader = Fil...
Processes a CSV file .
142,548
public String prompt ( final String configKey , final String message ) { System . out . print ( resolveProperty ( message ) + " " ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( System . in ) ) ; try { String value = StringUtils . trim ( in . readLine ( ) ) ; config . put ( configKey , value ) ; re...
Prompts for closure - line input . the input is stored in the configuration under the specified key .
142,549
public Rectangle intersection ( Rectangle other ) { int left = Math . max ( this . left , other . left ) ; int top = Math . max ( this . top , other . top ) ; int right = Math . min ( this . right , other . right ) ; int bottom = Math . min ( this . bottom , other . bottom ) ; if ( right >= left && bottom >= top ) { in...
Returns the intersection with the other rectangle or null if the two rectangles do not intersect .
142,550
public static MozuUrl deleteChannelUrl ( String code ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/channels/{code}" ) ; formatter . formatUrl ( "code" , code ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteChannel
142,551
public static String getMemoryInfo ( final Unit unit ) { final long [ ] memory = getMemoryInfo ( ) ; for ( final Type type : Type . values ( ) ) { memory [ type . ordinal ( ) ] /= unit . getDenominator ( ) ; } final StringBuilder sb = new StringBuilder ( 100 ) ; sb . append ( "Memory (free/total/max): " ) ; sb . append...
Get information about the current memory status of the JVM .
142,552
public static MozuUrl transformDocumentContentUrl ( String crop , String documentId , String documentListName , Integer height , Integer max , Integer maxHeight , Integer maxWidth , Integer quality , Integer width ) { UrlFormatter formatter = new UrlFormatter ( "/api/content/documentlists/{documentListName}/documents/{...
Get Resource Url for TransformDocumentContent
142,553
public static MozuUrl getDocumentUrl ( String documentId , String documentListName , Boolean includeInactive , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/content/documentlists/{documentListName}/documents/{documentId}?includeInactive={includeInactive}&responseFields={responseFields}" ) ...
Get Resource Url for GetDocument
142,554
public static MozuUrl updateDocumentUrl ( String documentId , String documentListName , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/content/documentlists/{documentListName}/documents/{documentId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "documentId" , documentId ) ; f...
Get Resource Url for UpdateDocument
142,555
public static MozuUrl deleteDocumentUrl ( String documentId , String documentListName ) { UrlFormatter formatter = new UrlFormatter ( "/api/content/documentlists/{documentListName}/documents/{documentId}" ) ; formatter . formatUrl ( "documentId" , documentId ) ; formatter . formatUrl ( "documentListName" , documentList...
Get Resource Url for DeleteDocument
142,556
public static MozuUrl deleteCouponUrl ( String couponCode , String couponSetCode ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/couponsets/{couponSetCode}/couponcodes/{couponCode}" ) ; formatter . formatUrl ( "couponCode" , couponCode ) ; formatter . formatUrl ( "couponSetCode" , couponSet...
Get Resource Url for DeleteCoupon
142,557
public static String about ( ) { final StringBuffer about = new StringBuffer ( ) ; about . append ( getProductName ( ) ) . append ( " " ) . append ( getVersion ( ) ) . append ( "\n" ) . append ( "\u00A9 2007-2014 Sualeh Fatehi" ) ; return new String ( about ) ; }
Information about this product .
142,558
public static HighScoringPair valueOf ( final String value ) { checkNotNull ( value ) ; List < String > tokens = Splitter . on ( "\t" ) . trimResults ( ) . splitToList ( value ) ; if ( tokens . size ( ) != 12 ) { throw new IllegalArgumentException ( "value must have twelve fields" ) ; } String source = tokens . get ( 0...
Return a new high scoring pair parsed from the specified value .
142,559
public void exitScope ( ) { Map < Key < ? > , Object > scopeMap = scopeStackCache . get ( ) . peek ( ) ; performDisposal ( scopeMap ) ; scopeStackCache . get ( ) . pop ( ) ; log . debug ( "Exited scope." ) ; }
Exists the scope context of the current thread by popping the context s map off the internal stack .
142,560
public static MozuUrl removeAllMessagesUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/carts/current/messages" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for RemoveAllMessages
142,561
public static MozuUrl removeMessageUrl ( String messageId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/carts/current/messages/{messageId}" ) ; formatter . formatUrl ( "messageId" , messageId ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for RemoveMessage
142,562
public E get ( ) { if ( originalElements . isEmpty ( ) ) { return null ; } if ( ! priorityElements . isEmpty ( ) ) { return priorityElements . remove ( 0 ) ; } if ( currentElements . size ( ) <= originalElements . size ( ) ) { currentElements . addAll ( originalElements ) ; } int index = random . getInt ( currentElemen...
Returns the next random element .
142,563
public void reset ( ) { this . priorityElements = Lists . newArrayList ( originalElements ) ; Collections . shuffle ( priorityElements ) ; this . currentElements = Lists . newArrayListWithExpectedSize ( 2 * originalElements . size ( ) ) ; this . currentElements . addAll ( originalElements ) ; }
Resets this object so it behaves like a newly constructed instance .
142,564
public static MozuUrl getWishlistByNameUrl ( Integer customerAccountId , String responseFields , String wishlistName ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/wishlists/customers/{customerAccountId}/{wishlistName}?responseFields={responseFields}" ) ; formatter . formatUrl ( "customerAccountId" , cu...
Get Resource Url for GetWishlistByName
142,565
public static MozuUrl updateWishlistUrl ( String responseFields , String wishlistId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/wishlists/{wishlistId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "wishlistId" , wishlistId )...
Get Resource Url for UpdateWishlist
142,566
public static MozuUrl getApplicationUrl ( String appId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/platform/applications/{appId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "appId" , appId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new Moz...
Get Resource Url for GetApplication
142,567
public double [ ] getColumn ( int col ) { double [ ] column = new double [ numRows ] ; int offset = translate ( 0 , col , numRows ) ; for ( int i = 0 ; i < column . length ; i ++ ) { column [ i ] = matrix [ offset + i ] ; } return column ; }
Gets a whole column of the matrix as a double array .
142,568
public double [ ] getRow ( int row ) { double [ ] rowArray = new double [ getColumnCount ( ) ] ; for ( int i = 0 ; i < getColumnCount ( ) ; i ++ ) { rowArray [ i ] = get ( row , i ) ; } return rowArray ; }
Get a single row of the matrix as a double array .
142,569
public void setRow ( int row , double [ ] value ) { for ( int i = 0 ; i < value . length ; i ++ ) { this . matrix [ translate ( row , i , numRows ) ] = value [ i ] ; } }
Sets the row to a given double array .
142,570
public void setColumn ( int col , double [ ] values ) { int offset = translate ( 0 , col , numRows ) ; System . arraycopy ( values , 0 , matrix , offset , values . length ) ; }
Sets the column to a given double array .
142,571
public static MozuUrl getCartUrl ( String cartId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/carts/{cartId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "cartId" , cartId ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; return new MozuUrl ( for...
Get Resource Url for GetCart
142,572
public static MozuUrl getUserCartSummaryUrl ( String responseFields , String userId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/carts/user/{userId}/summary?responseFields={responseFields}" ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "userId" , userId ) ; ...
Get Resource Url for GetUserCartSummary
142,573
public static MozuUrl rejectSuggestedDiscountUrl ( String cartId , Integer discountId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/carts/{cartId}/rejectautodiscount/{discountId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "cartId" , cartId ) ; formatter . forma...
Get Resource Url for RejectSuggestedDiscount
142,574
public static MozuUrl deleteCurrentCartUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/carts/current" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for DeleteCurrentCart
142,575
public static MozuUrl getViewDocumentsUrl ( String documentListName , String filter , Boolean includeInactive , Integer pageSize , String responseFields , String sortBy , Integer startIndex , String viewName ) { UrlFormatter formatter = new UrlFormatter ( "/api/content/documentlists/{documentListName}/views/{viewName}/...
Get Resource Url for GetViewDocuments
142,576
static void checkClosedOpen ( final Range < Long > range ) { checkNotNull ( range ) ; checkArgument ( BoundType . CLOSED == range . lowerBoundType ( ) , "range must be [closed, open), lower bound type was open" ) ; checkArgument ( BoundType . OPEN == range . upperBoundType ( ) , "range must be [closed, open), upper bou...
Confirm that the specified range is [ closed open ) .
142,577
public static long length ( final Range < Long > range ) { checkClosedOpen ( range ) ; return Math . max ( 0L , range . upperEndpoint ( ) - range . lowerEndpoint ( ) ) ; }
Return the length of the specified range .
142,578
public static List < Long > lengths ( final Iterable < Range < Long > > ranges ) { checkNotNull ( ranges ) ; List < Long > lengths = new ArrayList < Long > ( ) ; for ( Range < Long > range : ranges ) { lengths . add ( length ( range ) ) ; } return lengths ; }
Return the lengths of the specified ranges .
142,579
public static long length ( final Iterable < Range < Long > > ranges ) { checkNotNull ( ranges ) ; RangeSet < Long > rangeSet = TreeRangeSet . create ( ) ; for ( Range < Long > range : ranges ) { rangeSet . add ( range ) ; } long length = 0L ; for ( Range < Long > range : rangeSet . asRanges ( ) ) { length += length ( ...
Return the sum of lengths of the specified ranges after merging overlapping ranges .
142,580
public static int count ( final Iterable < Range < Long > > ranges ) { int count = 0 ; for ( Range < Long > range : ranges ) { checkClosedOpen ( range ) ; count ++ ; } return count ; }
Return the count of the specified ranges .
142,581
static boolean isGapSymbol ( final Symbol symbol ) { return AlphabetManager . getGapSymbol ( ) . equals ( symbol ) || DNATools . getDNA ( ) . getGapSymbol ( ) . equals ( symbol ) ; }
Return true if the specified symbol is a gap symbol .
142,582
static boolean isMatchSymbol ( final Symbol symbol ) { if ( ! ( symbol instanceof BasisSymbol ) ) { return false ; } BasisSymbol basisSymbol = ( BasisSymbol ) symbol ; Set < Symbol > uniqueSymbols = new HashSet < Symbol > ( ) ; for ( Object o : basisSymbol . getSymbols ( ) ) { Symbol s = ( Symbol ) o ; if ( isGapSymbol...
Return true if the specified symbol represents an alignment match .
142,583
public static List < Range < Long > > gaps ( final GappedSymbolList gappedSymbols ) { checkNotNull ( gappedSymbols ) ; List < Range < Long > > gaps = new ArrayList < Range < Long > > ( ) ; int gapStart = - 1 ; for ( int i = 1 , length = gappedSymbols . length ( ) + 1 ; i < length ; i ++ ) { if ( isGapSymbol ( gappedSym...
Return the gaps in the specified gapped symbol list as 0 - based [ closed open ) ranges .
142,584
public static List < Range < Long > > matches ( final AlignmentPair alignmentPair ) { checkNotNull ( alignmentPair ) ; List < Range < Long > > matches = new ArrayList < Range < Long > > ( ) ; int matchStart = - 1 ; for ( int i = 1 , length = alignmentPair . length ( ) + 1 ; i < length ; i ++ ) { if ( isMatchSymbol ( al...
Return the alignment matches in the specified alignment pair as 0 - based [ closed open ) ranges .
142,585
public static List < Range < Long > > mismatches ( final AlignmentPair alignmentPair ) { checkNotNull ( alignmentPair ) ; List < Range < Long > > mismatches = new ArrayList < Range < Long > > ( ) ; int mismatchStart = - 1 ; for ( int i = 1 , length = alignmentPair . length ( ) + 1 ; i < length ; i ++ ) { if ( isMismatc...
Return the alignment mismatches in the specified alignment pair as 0 - based [ closed open ) ranges .
142,586
public static < C extends Comparable > C center ( final Range < C > range ) { checkNotNull ( range ) ; if ( ! range . hasLowerBound ( ) && ! range . hasUpperBound ( ) ) { throw new IllegalStateException ( "cannot find the center of a range without bounds" ) ; } if ( ! range . hasLowerBound ( ) ) { return range . upperE...
Return the center of the specified range .
142,587
public static < C extends Comparable > boolean intersect ( final Range < C > range0 , final Range < C > range1 ) { checkNotNull ( range0 ) ; checkNotNull ( range1 ) ; return range0 . isConnected ( range1 ) && ! range0 . intersection ( range1 ) . isEmpty ( ) ; }
Return true if the specified ranges intersect .
142,588
public static < C extends Comparable > boolean isLessThan ( final Range < C > range , final C value ) { checkNotNull ( range ) ; checkNotNull ( value ) ; if ( ! range . hasUpperBound ( ) ) { return false ; } if ( range . upperBoundType ( ) == BoundType . OPEN && range . upperEndpoint ( ) . equals ( value ) ) { return t...
Return true if the specified range is strictly less than the specified value .
142,589
public static < C extends Comparable > boolean isGreaterThan ( final Range < C > range , final C value ) { checkNotNull ( range ) ; checkNotNull ( value ) ; if ( ! range . hasLowerBound ( ) ) { return false ; } if ( range . lowerBoundType ( ) == BoundType . OPEN && range . lowerEndpoint ( ) . equals ( value ) ) { retur...
Return true if the specified range is strictly greater than the specified value .
142,590
public static < C extends Comparable > Ordering < Range < C > > orderingByLowerEndpoint ( ) { return new Ordering < Range < C > > ( ) { public int compare ( final Range < C > left , final Range < C > right ) { return ComparisonChain . start ( ) . compare ( left . hasLowerBound ( ) , right . hasLowerBound ( ) ) . compar...
Return an ordering by lower endpoint over ranges .
142,591
public static < C extends Comparable > Ordering < Range < C > > reverseOrderingByLowerEndpoint ( ) { Ordering < Range < C > > orderingByLowerEndpoint = orderingByLowerEndpoint ( ) ; return orderingByLowerEndpoint . reverse ( ) ; }
Return a reverse ordering by lower endpoint over ranges .
142,592
public static < C extends Comparable > Ordering < Range < C > > orderingByUpperEndpoint ( ) { return new Ordering < Range < C > > ( ) { public int compare ( final Range < C > left , final Range < C > right ) { return ComparisonChain . start ( ) . compare ( left . hasUpperBound ( ) , right . hasUpperBound ( ) ) . compar...
Return an ordering by upper endpoint over ranges .
142,593
public static < C extends Comparable > Ordering < Range < C > > reverseOrderingByUpperEndpoint ( ) { Ordering < Range < C > > orderingByUpperEndpoint = orderingByUpperEndpoint ( ) ; return orderingByUpperEndpoint . reverse ( ) ; }
Return a reverse ordering by upper endpoint over ranges .
142,594
public static MozuUrl getCurrencyExchangeRatesUrl ( ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/storefront/currencies/exchangerates" ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ; }
Get Resource Url for GetCurrencyExchangeRates
142,595
public void extractFromArchive ( final File targetFile , final boolean forceOverwrite ) throws IOException { if ( zipArchive != null ) { ZipEntry entry = zipArchive . getEntry ( targetFile . getName ( ) ) ; if ( entry != null ) { if ( ! targetFile . exists ( ) ) { try { targetFile . createNewFile ( ) ; } catch ( IOExce...
Extracts the specified file from this configuration s zip file if applicable .
142,596
public static MozuUrl getDestinationUrl ( String checkoutId , String destinationId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/checkouts/{checkoutId}/destinations/{destinationId}?responseFields={responseFields}" ) ; formatter . formatUrl ( "checkoutId" , checkoutId ) ; formatt...
Get Resource Url for GetDestination
142,597
public static MozuUrl addDestinationUrl ( String checkoutId , String responseFields ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/checkouts/{checkoutId}/destinations?responseFields={responseFields}" ) ; formatter . formatUrl ( "checkoutId" , checkoutId ) ; formatter . formatUrl ( "responseFields" , res...
Get Resource Url for AddDestination
142,598
public static MozuUrl removeDestinationUrl ( String checkoutId , String destinationId ) { UrlFormatter formatter = new UrlFormatter ( "/api/commerce/checkouts/{checkoutId}/destinations/{destinationId}" ) ; formatter . formatUrl ( "checkoutId" , checkoutId ) ; formatter . formatUrl ( "destinationId" , destinationId ) ; ...
Get Resource Url for RemoveDestination
142,599
public static Iterable < VcfSample > samples ( final Readable readable ) throws IOException { checkNotNull ( readable ) ; ParseListener parseListener = new ParseListener ( ) ; VcfParser . parse ( readable , parseListener ) ; return parseListener . getSamples ( ) . values ( ) ; }
Read zero or more VCF samples from the specified readable .