code
stringlengths
10
174k
nl
stringlengths
3
129k
public static void ensureParentFolderHierarchyExists(IFolder folder){ IContainer parent=folder.getParent(); if (parent instanceof IFolder) { ensureFolderHierarchyExists((IFolder)parent); } }
Ensures the given folder's parent hierarchy is created if they do not already exist.
private Trees(){ throw new UnsupportedOperationException(); }
Utility classes should not be instantiated.
private Element drawLine(DBIDRef iter){ SVGPath path=new SVGPath(); final SpatialComparable obj=relation.get(iter); final int dims=proj.getVisibleDimensions(); boolean drawn=false; int valid=0; double prevpos=Double.NaN; for (int i=0; i < dims; i++) { final int d=proj.getDimForAxis(i); double minP...
Draw a single line.
public void testExceptionWithEmpty() throws Exception { ObjectMapper mapper=new ObjectMapper(); try { Object result=mapper.readValue(" ",Object.class); fail("Expected an exception, but got result value: " + result); } catch ( Exception e) { verifyException(e,EOFException.class,"No content"); } ...
Simple test to check behavior when end-of-stream is encountered without content. Should throw EOFException.
@Override public void dropUser(User user,boolean ignore) throws SQLException { String sql=String.format("drop user %s",user.getLogin()); try { execute(sql); } catch ( SQLException e) { if (!ignore) { throw e; } else if (logger.isDebugEnabled()) { logger.debug("Drop user failed: " + ...
Drops user, ignoring errors if desired by caller.
public boolean loadSoundEffects(){ int attempts=3; LoadSoundEffectReply reply=new LoadSoundEffectReply(); synchronized (reply) { sendMsg(mAudioHandler,MSG_LOAD_SOUND_EFFECTS,SENDMSG_QUEUE,0,0,reply,0); while ((reply.mStatus == 1) && (attempts-- > 0)) { try { reply.wait(SOUND_EFECTS_LOAD_TIMEOU...
Loads samples into the soundpool. This method must be called at first when sound effects are enabled
public static final int gcd(int p,int q){ if (q == 0) { return p; } return gcd(q,p % q); }
Computes the Greatest Common Devisor of integers p and q.
public static void sort(int[] keys,int[] values,int offset,int length){ hybridsort(keys,values,offset,offset + length - 1); }
Sorts a range from the keys in an increasing order. Elements key[i] and values[i] are always swapped together in the corresponding arrays. <p> A mixture of several sorting algorithms is used: <p> A radix sort performs better on the numeric data we sort, but requires additional storage to perform the sorting. Therefore ...
public boolean isRegistered(ObjectName name){ return mbsInterceptor.isRegistered(name); }
Checks whether an MBean, identified by its object name, is already registered with the MBean server.
private void startItemListItem(StringBuilder result,String rootId,String itemId){ result.append("<div class=\"subtree\">"); result.append("<div class=\"alone " + itemId + "\" id=\"alone_"+ rootId+ ":"+ itemId+ "\">"); }
Called to start adding an item to an item list.
void write(ImageOutputStream ios) throws IOException { }
Writes the data for this segment to the stream in valid JPEG format.
public PatternEveryExpr(){ }
Ctor - for use to create a pattern expression tree, without pattern child expression.
private boolean tryQueueCurrentBuffer(long elapsedWaiting){ if (currentBuffer.isEmpty()) return true; if (isOpen && neverPubQueue.size() < neverPubCapacity) { neverPubQueue.add(currentBuffer); totalQueuedRecords.addAndGet(currentBuffer.sizeRecords()); totalQueuedBuffers.incrementAndGet(); onQueueB...
Keep private. Call only when holding lock.
private void writeKeysWithPrefix(String prefix,String exclude){ for ( String key : keys) { if (key.startsWith(prefix) && !key.startsWith(exclude)) { ps.println(key + "=" + prop.getProperty(key)); } } ps.println(); }
writes all keys starting with the specified prefix and not starting with the exclude prefix in alphabetical order.
public ProtocolInfo(String name,Collection<Form> connectionForms,Collection<Form> sharingProfileForms){ this.name=name; this.connectionForms=connectionForms; this.sharingProfileForms=sharingProfileForms; }
Creates a new ProtocolInfo having the given name and forms. The given collections of forms are used to describe the parameters for connections and sharing profiles respectively.
public Prepared prepare(String sql){ Prepared p=parse(sql); p.prepare(); if (currentTokenType != END) { throw getSyntaxError(); } return p; }
Parse the statement and prepare it for execution.
void analyze(boolean verbose){ if (verbose) { if (traces.length > 1) System.out.println("Combining " + traces.length + " traces."); } final Tree tree0=getTree(0); double[][] changed=new double[tree0.getNodeCount()][tree0.getNodeCount()]; double[] rateConditionalOnChange=new double[tree0.getNodeCount()...
Actually analyzes the trace given the burnin
public void logging(String msg1,String msg2,String msg3){ System.out.print(msg1); System.out.print(" "); System.out.print(msg2); System.out.print(" "); System.out.println(msg3); }
Prints a log message.
public void initQueryStringHandlers(){ this.transport=new SimpleTargetedChain(); this.transport.setOption("qs.list","org.apache.axis.transport.http.QSListHandler"); this.transport.setOption("qs.method","org.apache.axis.transport.http.QSMethodHandler"); this.transport.setOption("qs.wsdl","org.apache.axis.transpo...
Initialize a Handler for the transport defined in the Axis server config. This includes optionally filling in query string handlers.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:42.071 -0500",hash_original_method="236CE70381CAE691CF8D03F3D0A7E2E8",hash_generated_method="34048EFAD324F63AAF648818713681BB") public static String toUpperCase(String string){ boolean changed=false; char[] chars=string.toCharAr...
A locale independent version of toUpperCase.
HTMLForm(HTMLComponent htmlC,String action,String method,String encType){ this.htmlC=htmlC; this.action=htmlC.convertURL(action); this.encType=encType; if (htmlC.getHTMLCallback() != null) { int linkProps=htmlC.getHTMLCallback().getLinkProperties(htmlC,this.action); if ((linkProps & HTMLCallback.LINK_FO...
Constructs the HTMLForm
public CurlInterceptor(Loggable logger,long limit){ this.logger=logger; this.limit=limit; }
Interceptor responsible for printing curl logs
@Override public String toString(){ return String.valueOf(value); }
Returns the String value of this mutable.
public void unRegisterImpulseConstraint(ImpulseConstraint con){ collisionResponseRows-=((ImpulseConstraint)con).GetCollisionResponseRows(); collisions.remove(con); }
Un-registers an impulse constraint with the constraint engine
Index(Node<K,V> node,Index<K,V> down,Index<K,V> right){ this.node=node; this.down=down; this.right=right; }
Creates index node with given values.
@Override public void run(){ amIActive=true; String rasterHeader=null; String distributionType=null; int numberOfClasses=-1; String statsFileName=null; int numCols, numRows; int col, row; double value; List<Double> values=new ArrayList<>(); String str; float progress=0; int index; int h; Fil...
Used to execute this plugin tool.
public boolean isInBoundsX(float x){ if (isInBoundsLeft(x) && isInBoundsRight(x)) return true; else return false; }
BELOW METHODS FOR BOUNDS CHECK
public T caseAnonymous_constraint_1_(Anonymous_constraint_1_ object){ return null; }
Returns the result of interpreting the object as an instance of '<em>Anonymous constraint 1</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
public CProjectLoaderReporter(final ListenerProvider<IProjectListener> listeners){ m_listeners=listeners; }
Creates a new reporter object.
public String[] queryUniqueIdentifiersForLuns(String arrayUniqueId) throws InvalidArgument, NotFound, InvalidSession, StorageFault, NotImplemented { final String methodName="queryUniqueIdentifiersForLuns(): "; log.info(methodName + "Entry with arrayUniqueId[" + arrayUniqueId+ "]"); sslUtil.checkHttpRequest(true,t...
Returns unique identifiers for LUNs for the give array Id
@Override public boolean onCreateOptionsMenu(Menu menu){ mOpsOptionsMenu=menu; MenuInflater inflater=getMenuInflater(); inflater.inflate(R.menu.ops_options_menu,menu); return true; }
Inflates the Operations ("Ops") Option Menu.
protected PackageImpl(){ super(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public void fillAttributeSet(Set attrSet){ attrSet.add("lang"); }
Fills the given set with the attribute names found in this selector.
public void addColumn(final String columnFamily,final String columnQualifier){ Set<String> columns=this.columnFamilies.get(columnFamily); if (columns == null) { columns=new HashSet<String>(); } columns.add(columnQualifier); this.columnFamilies.put(columnFamily,columns); }
Add column family and column qualifier to be extracted from tuple
public static Field<String> ofString(String name,String description){ return new Field<>(name,String.class,description); }
Break down metrics by string. <p> Each unique string will allocate a new submetric. <b>Do not use user content as a field value</b> as field values are never reclaimed.
public OMPoint(double lat,double lon,int radius){ setRenderType(RENDERTYPE_LATLON); set(lat,lon); this.radius=radius; }
Create an OMPoint at a lat/lon position, with the specified radius.
private void saveMicroAgents(final IScope scope,final IMacroAgent agent) throws GamaRuntimeException { innerPopulations=new THashMap<String,List<SavedAgent>>(); for ( final IPopulation<? extends IAgent> microPop : agent.getMicroPopulations()) { final List<SavedAgent> savedAgents=new ArrayList<SavedAgent>(); ...
Recursively save micro-agents of an agent.
public GenerationResult(Shell parent,int style,IPath location,final IResource target){ super(parent,style); this.location=location; this.targetResource=target; setText("EvoSuite Result"); }
Create the dialog.
public void run(){ ActivationLibrary.deactivate(this,getID()); }
Thread to deactivate object. First attempts to make object inactive (via the inactive method). If that fails (the object may still have pending/executing calls), then unexport the object forcibly.
private static a createImageLink(String AD_Language,String name,String js_command,boolean enabled,boolean pressed){ a img=new a("#",createImage(AD_Language,name)); if (!pressed || !enabled) img.setID("imgButtonLink"); else img.setID("imgButtonPressedLink"); if (js_command == null) js_command="'Submit'"; ...
Create Image with name, id of button_name and set P_Command onClick
public CassandraStatus(CassandraMode mode,boolean joined,boolean rpcRunning,boolean nativeTransportRunning,boolean gossipInitialized,boolean gossipRunning,String hostId,String endpoint,int tokenCount,String dataCenter,String rack,String version){ this.mode=mode; this.joined=joined; this.rpcRunning=rpcRunning; t...
Constructs a CassandraStatus.
public void checkDataSource(Map<String,ModelEntity> modelEntities,List<String> messages,boolean addMissing) throws GenericEntityException { genericDAO.checkDb(modelEntities,messages,addMissing); }
Check the datasource to make sure the entity definitions are correct, optionally adding missing entities or fields on the server
public static HashMap<String,String> string2HashMap(String paramString){ HashMap<String,String> params=new HashMap<>(); for ( String keyValue : paramString.split(" *& *")) { String[] pairs=keyValue.split(" *= *",2); params.put(pairs[0],pairs.length == 1 ? "" : pairs[1]); } return params; }
Convert key=value type String to HashMap<String,String>
@LargeTest public void testMediaVideoItemRenderingModes() throws Exception { final String videoItemFileName=INPUT_FILE_PATH + "H263_profile0_176x144_15fps_256kbps_AACLC_32kHz_128kbps_s_0_26.3gp"; final int videoItemRenderingMode=MediaItem.RENDERING_MODE_BLACK_BORDER; boolean flagForException=false; final MediaV...
To test creation of Media Video Item with Set and Get rendering Mode
public void visitTree(JCTree tree){ }
Default member enter visitor method: do nothing
private EventLogControlPanel createControls(){ EventLogControlPanel c=new EventLogControlPanel(); c.addHeading("connections"); conUpCheck=c.addControl("up"); conDownCheck=c.addControl("down"); c.addHeading("messages"); msgCreateCheck=c.addControl("created"); msgTransferStartCheck=c.addControl("started rel...
Creates a control panel for the log
@Override public String type(){ return type; }
Returns the type of document to get the term vector for.
public void test_getIterator$Ljava_text_AttributedCharacterIterator$AttributeII(){ String test="Test string"; try { Map<AttributedCharacterIterator.Attribute,String> hm=new HashMap<AttributedCharacterIterator.Attribute,String>(); AttributedCharacterIterator.Attribute[] aci=new AttributedCharacterIterator.At...
java.text.AttributedString#getIterator(AttributedCharacterIterator.Attribute[], int, int) Test of method java.text.AttributedString#getIterator(AttributedCharacterIterator.Attribute[], int, int).
private void newplan(TransformationPlan plan){ if (plan.replaces(this.plan)) { this.plan=plan; } }
Install a new plan iff it's more drastic than the existing plan
private SmallContingencyTables buildSmallContingencyTables(){ Set<String> allLabelSet=new TreeSet<String>(); for ( SingleOutcome outcome : id2Outcome.getOutcomes()) { allLabelSet.addAll(outcome.getLabels()); } List<String> labelList=new ArrayList<String>(allLabelSet); int numberOfLabels=labelList.size();...
build small contingency tables (a small contingency table for each label) from id2Outcome
protected String doIt() throws Exception { MRfQ rfq=new MRfQ(getCtx(),p_C_RfQ_ID,get_TrxName()); if (rfq.get_ID() == 0) throw new IllegalArgumentException("No RfQ found"); log.info(rfq.toString()); MRfQResponse[] responses=rfq.getResponses(true,true); log.config("#Responses=" + responses.length); if (resp...
Process. Create purchase order(s) for the resonse(s) and lines marked as Selected Winner using the selected Purchase Quantity (in RfQ Line Quantity) . If a Response is marked as Selected Winner, all lines are created (and Selected Winner of other responses ignored). If there is no response marked as Selected Winne...
public String commandTopic(String command){ if (command == null) { command="+"; } return cmdTopic.replace("{COMMAND}",command); }
Get the MQTT topic for a command.
public static boolean hasExtension(String extension){ if (TextUtils.isEmpty(extension)) { return false; } return extensionToMimeTypeMap.containsKey(extension); }
Returns true if the given extension has a registered MIME type.
@Before public void onBefore(){ tut=new TransportUnitType("TUT"); loc1=new Location(new LocationPK("AREA","ASL","X","Y","Z")); loc2=new Location(new LocationPK("ARE2","ASL2","X2","Y2","Z2")); product=new Product("tttt"); entityManager.persist(product); entityManager.persist(tut); entityManager.persist(loc...
Setup some test data.
public void beforeRerunningIndexCreationQuery(){ }
Asif : Called just before IndexManager executes the function rerunIndexCreationQuery. After this function gets invoked, IndexManager will iterate over all the indexes of the region making the data maps null & re running the index creation query on the region. The method of Index Manager gets executed from the clear fun...
public float buffered(){ return totalSize > 0 ? Futures.getUnchecked(response).cache.cacheSize() / (float)totalSize : -1; }
Returns the percentage that is buffered, or -1, if unknown
@Override public boolean accept(File dir,String name){ return accept(new File(dir,name)); }
Returns true if the file in the given directory with the given name should be accepted.
public static void main(String... a) throws Exception { TestBase.createCaller().init().test(); }
Run just this test.
public boolean isFieldPresent(String field){ return fields.containsKey(field); }
Checks if the given field is present in this extension because not every field is mandatory (according to scim 2.0 spec).
public static String mapToStr(Map<? extends Object,? extends Object> map){ if (map == null) return null; StringBuilder buf=new StringBuilder(); boolean first=true; for ( Map.Entry<? extends Object,? extends Object> entry : map.entrySet()) { Object key=entry.getKey(); Object value=entry.getValue(); ...
Creates an encoded String from a Map of name/value pairs (MUST BE STRINGS!)
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:42.074 -0500",hash_original_method="002C3CFFC816A38E005543BB54E228FD",hash_generated_method="24D6A751F50FC61EC42FBA4D0FC608F4") public static String toLowerCase(String string){ boolean changed=false; char[] chars=string.toCharAr...
A locale independent version of toLowerCase.
public String numberToWords(int num){ if (num == 0) { return LESS_THAN_TWENTY[0]; } int i=0; StringBuilder res=new StringBuilder(); while (num > 0) { if (num % 1000 != 0) { res.insert(0," "); res.insert(0,THOUSANDS[i]); res.insert(0,helper(num % 1000)); } num/=1000; i++; ...
Math, String. Try to find the pattern first. The numbers less than 1000, e.g. xyz, can be x Hundred y"ty" z. The numbers larger than 1000, we need to add thousand or million or billion. Given a number num, we pronounce the least significant digits first. Then concat the result to the end to next three least significant...
public boolean hasLat(){ return super.hasAttribute(LAT); }
Returns whether it has the Latitude.
public void test_ConstructorIF(){ HashSet hs2=new HashSet(5,(float)0.5); assertEquals("Created incorrect HashSet",0,hs2.size()); try { new HashSet(0,0); } catch ( IllegalArgumentException e) { return; } fail("Failed to throw IllegalArgumentException for initial load factor <= 0"); }
java.util.HashSet#HashSet(int, float)
private int emitCharMapArray(){ CharClasses cl=parser.getCharClasses(); if (cl.getMaxCharCode() < 256) { emitCharMapArrayUnPacked(); return 0; } intervals=cl.getIntervals(); println(""); println(" /** "); println(" * Translates characters to character classes"); println(" */"); println(" ...
Returns the number of elements in the packed char map array, or zero if the char map array will be not be packed. This will be more than intervals.length if the count for any of the values is more than 0xFFFF, since the number of char map array entries per value is ceil(count / 0xFFFF)
public int size(){ return mSize; }
Returns the number of key-value mappings that this SparseDoubleArray currently stores.
public void depends(int parent,int child){ dag.addNode(child); dag.addNode(parent); dag.addEdge(parent,child); }
Adds a dependency relation ship between two variables that will be in the network. The integer value corresponds the the index of the i'th categorical variable, where the class target's value is the number of categorical variables.
public DiscreteTransfer(int[] tableValues){ this.tableValues=tableValues; this.n=tableValues.length; }
The input is an int array which will be used later to construct the lut data
public static final float roundTo(float val,float prec){ return floor(val / prec + 0.5f) * prec; }
Rounds a single precision value to the given precision.
public static <K,V>List<KeyValue<K,V>> readKeyValues(String topic,Properties consumerConfig,int maxMessages){ KafkaConsumer<K,V> consumer=new KafkaConsumer<>(consumerConfig); consumer.subscribe(Collections.singletonList(topic)); int pollIntervalMs=100; int maxTotalPollTimeMs=2000; int totalPollTimeMs=0; Lis...
Returns up to `maxMessages` by reading via the provided consumer (the topic(s) to read from are already configured in the consumer).
private int segment(Object key){ return Math.abs(key.hashCode() % size); }
This method performs the translation of the key hash code to the segment index within the list. Translation is done by acquiring the modulus of the hash and the list size.
private void handleStateLeaving(InetAddress endpoint){ Collection<Token> tokens=getTokensFor(endpoint); if (logger.isDebugEnabled()) logger.debug("Node {} state leaving, tokens {}",endpoint,tokens); if (!tokenMetadata.isMember(endpoint)) { logger.info("Node {} state jump to leaving",endpoint); tokenMeta...
Handle node preparing to leave the ring
public MAttributeInstance(Properties ctx,int M_Attribute_ID,int M_AttributeSetInstance_ID,BigDecimal BDValue,String trxName){ super(ctx,0,trxName); setM_Attribute_ID(M_Attribute_ID); setM_AttributeSetInstance_ID(M_AttributeSetInstance_ID); setValueNumber(BDValue); }
Number Value Constructior
@Override public boolean supportsPositionedUpdate(){ debugCodeCall("supportsPositionedUpdate"); return true; }
Returns whether positioned updates are supported.
@SuppressWarnings("unchecked") private boolean prepareMapping(String index,Map<String,Object> defaultMappings){ boolean success=true; for ( Map.Entry<String,Object> stringObjectEntry : defaultMappings.entrySet()) { Map<String,Object> mapping=(Map<String,Object>)stringObjectEntry.getValue(); if (mapping == ...
This method applies the supplied mapping to the index.
public void disableOcr(){ if (!ocrDisabled) { excludeParser(TesseractOCRParser.class); ocrDisabled=true; pdfConfig.setExtractInlineImages(false); } }
Disable OCR. This method only has an effect if Tesseract is installed.
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd,int featureID,NotificationChain msgs){ switch (featureID) { case DatatypePackage.DICTIONARY_PROPERTY_TYPE__KEY_TYPE: return basicSetKeyType(null,msgs); case DatatypePackage.DICTIONARY_PROPERTY_TYPE__VALUE_TYPE: return basicSetValueType(nul...
<!-- begin-user-doc --> <!-- end-user-doc -->
public static void main(String[] args){ (new Am()).run(args); }
Command-line entry point.
public void removeAllHighlights(){ TextUI mapper=component.getUI(); if (getDrawsLayeredHighlights()) { int len=highlights.size(); if (len != 0) { int minX=0; int minY=0; int maxX=0; int maxY=0; int p0=-1; int p1=-1; for (int i=0; i < len; i++) { HighlightInf...
Removes all highlights.
public static void init(){ Properties p; try { p=System.getProperties(); } catch ( java.security.AccessControlException ace) { p=new Properties(); } init(p); }
Initialize debugging from the system properties.
public Builder bySecond(Integer... seconds){ return bySecond(Arrays.asList(seconds)); }
Adds one or more BYSECOND rule parts.
public CakePHP3CustomizerPanel(){ initComponents(); init(); }
Creates new form CakePHP3CustomizerPanel
private void updateProgress(String progressLabel,int progress){ if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) { myHost.updateProgress(progressLabel,progress); } previousProgress=progress; previousProgressLabel=progressLabel; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
public char first(){ pos=0; return current(); }
Sets the position to getBeginIndex() and returns the character at that position.
@Benchmark public long test4_UsingKeySetAndForEach() throws IOException { long i=0; for ( Integer key : map.keySet()) { i+=key + map.get(key); } return i; }
4. Using keySet and foreach
@Override public void eUnset(int featureID){ switch (featureID) { case N4JSPackage.N4_FIELD_DECLARATION__DECLARED_TYPE_REF: setDeclaredTypeRef((TypeRef)null); return; case N4JSPackage.N4_FIELD_DECLARATION__BOGUS_TYPE_REF: setBogusTypeRef((TypeRef)null); return; case N4JSPackage.N4_FIELD_DECLARATION__DECLARED_NAME...
<!-- begin-user-doc --> <!-- end-user-doc -->
private StringTextStore(String text){ super(); fText=text != null ? text : ""; fCopyLimit=fText.length() > SMALL_TEXT_LIMIT ? fText.length() / 2 : 0; }
Create a text store with initial content.
public static double incompleteGammaP(double a,double x){ return incompleteGamma(x,a,lnGamma(a)); }
Incomplete Gamma function P(a,x) = 1-Q(a,x) (a cleanroom implementation of Numerical Recipes gammp(a,x); in Mathematica this function is 1-GammaRegularized)
@Scheduled(fixedDelay=60000) public void controlHerdJmsMessageListener(){ try { Boolean jmsMessageListenerEnabled=Boolean.valueOf(configurationHelper.getProperty(ConfigurationValue.JMS_LISTENER_ENABLED)); JmsListenerEndpointRegistry registry=ApplicationContextHolder.getApplicationContext().getBean("org.spring...
Periodically check the configuration and apply the action to the herd JMS message listener service, if needed.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-08-13 13:14:13.408 -0400",hash_original_method="FC36FCA077BB9356BFDFCA10D99D0311",hash_generated_method="2430FCC224E47ADC0C94FB89530AAC4A") public AnnotationTypeMismatchException(Method element,String foundType){ super("The annotation element...
Constructs an instance for the given type element and the type found.
public void startDrag(DragGestureEvent trigger,Cursor dragCursor,Transferable transferable,DragSourceListener dsl) throws InvalidDnDOperationException { startDrag(trigger,dragCursor,null,null,transferable,dsl,null); }
Start a drag, given the <code>DragGestureEvent</code> that initiated the drag, the initial <code>Cursor</code> to use, the <code>Transferable</code> subject data of the drag, and the <code>DragSourceListener</code>. <P>
@SuppressWarnings("IfMayBeConditional") public IgniteInternalFuture<?> dynamicStartCache(@Nullable CacheConfiguration ccfg,String cacheName,@Nullable NearCacheConfiguration nearCfg,CacheType cacheType,boolean failIfExists,boolean failIfNotStarted,boolean checkThreadTx){ if (checkThreadTx) checkEmptyTransactions(); ...
Dynamically starts cache.
private HtmlSelectOneMenu createFieldMenu(){ HtmlSelectOneMenu field=new HtmlSelectOneMenu(); List children=field.getChildren(); children.add(createSelectItem("Subject")); children.add(createSelectItem("Sender")); children.add(createSelectItem("Date")); children.add(createSelectItem("Priority")); children...
Creates the menu that allows the user to select a field.
public void close(){ synchronized (mDiskCacheLock) { if (mDiskLruCache != null) { try { if (!mDiskLruCache.isClosed()) { mDiskLruCache.close(); } } catch ( Throwable e) { LogUtils.e(e.getMessage(),e); } mDiskLruCache=null; } } }
Closes the disk cache associated with this ImageCache object. Note that this includes disk access so this should not be executed on the main/UI thread.
private void init(){ customElements=new CustomElementCollection(); this.setExtension(customElements); }
Common initialization code for new list entries.
public _ScheduleDays(){ super(); }
Constructs a _ScheduleDays with no flags initially set.
public int allocLow(int size,int addrAlignment){ for (MemoryChunk memoryChunk=low; memoryChunk != null; memoryChunk=memoryChunk.next) { if (memoryChunk.isAvailable(size,addrAlignment)) { return allocLow(memoryChunk,size,addrAlignment); } } return 0; }
Allocate a memory at the lowest address.
public double heapInit(){ return memory.getHeapMemoryUsage().getInit(); }
Returns the heap initial memory of the current JVM.
public final long size(){ int sum=0; for (int i=0; i < this.sets.length; i++) { sum+=this.sets[i].size(); } return sum; }
Returns the number of fingerprints in this set. Warning: The size is only accurate in single-threaded mode.
private static Location initLocation(GlowSession session,PlayerReader reader){ if (reader.hasPlayedBefore()) { Location loc=reader.getLocation(); if (loc != null) { return loc; } } return session.getServer().getWorlds().get(0).getSpawnLocation(); }
Read the location from a PlayerReader for entity initialization. Will fall back to a reasonable default rather than returning null.