code
stringlengths
10
174k
nl
stringlengths
3
129k
public int size(){ return nodes.size(); }
Returns the number of nodes that this instance contains.
public Select<Model> where(DataFilterClause filterClause,DataFilterClause.DataFilterConjunction conjunction){ this.filterCriteria.addClause(filterClause,conjunction); return this; }
The filter clause that will be used to apply filtering, adds the clause with the specified conjunction
@Override public Iterator<E> iterator(){ return new PriorityIterator(); }
Gets the iterator of the priority queue, which will not return elements in any specified ordering.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:53.519 -0400",hash_original_method="EACF8E2DE294FEF43D3A3F18958358BB",hash_generated_method="E8700504289C56C16DB5F0E6411ECFFD") public AndFileFilter(final List<IOFileFilter> fileFilters){ if (fileFilters == null) { this.fileFi...
Constructs a new instance of <code>AndFileFilter</code> with the specified list of filters.
private static List<String> buildSuperClassList(PsiClass psiClass,List<String> packages){ if (psiClass == null || psiClass.getQualifiedName().equals("java.lang.Object")) { return packages; } else { packages.add(psiClass.getQualifiedName()); return buildSuperClassList(psiClass.getSuperClass(),packages);...
Recurses up the superclass chain of the PsiClass provided to determine if the chain contains Activity or Fragment as one of the base classes. This will then be used to determine which lifecycle methods to sort by.
private void showFeedback(String message){ if (myHost != null) { myHost.showFeedback(message); } else { System.out.println(message); } }
Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface.
Status readStatus(Element el){ NodeList list=el.getElementsByTagName("status"); if (list == null || list.getLength() == 0) return DomainSuffix.DEFAULT_STATUS; return Status.valueOf(list.item(0).getFirstChild().getNodeValue()); }
read optional field status
public int size(){ acquireReadLock(); try { return this.idsAvailable.size(); } finally { releaseReadLock(); } }
Returns the size of the queue
public String numRulesTipText(){ return "Number of rules to find."; }
Returns the tip text for this property
public void testPolygonWithSpike() throws Exception { String geomStr="POLYGON ((3312459.605 6646878.353, 3312460.524 6646875.969, 3312459.427 6646878.421, 3312460.014 6646886.391, 3312465.889 6646887.398, 3312470.827 6646884.839, 3312475.4 6646878.027, 3312477.289 6646871.694, 3312472.748 6646869.547, 3312468.253 664...
Test is from http://lists.jump-project.org/pipermail/jts-devel/2008-February/002350.html
@Override public void panRangeAxes(double percent,PlotRenderingInfo info,Point2D source){ if (!isRangePannable() || this.rangeAxis == null) { return; } double length=this.rangeAxis.getRange().getLength(); double adj=percent * length; if (this.rangeAxis.isInverted()) { adj=-adj; } this.rangeAxis.se...
Pans the range axes by the specified percentage.
@Override public void transform(AffineTransform tx){ Point2D.Double anchor=getStartPoint(); Point2D.Double lead=getEndPoint(); setBounds((Point2D.Double)tx.transform(anchor,anchor),(Point2D.Double)tx.transform(lead,lead)); }
Moves the Figure to a new location.
private Figure readPolygonElement(IXMLElement elem) throws IOException { HashMap<AttributeKey,Object> a=new HashMap<AttributeKey,Object>(); readCoreAttributes(elem,a); readTransformAttribute(elem,a); readOpacityAttribute(elem,a); readShapeAttributes(elem,a); Point2D.Double[] points=toPoints(elem,readAttribu...
Reads an SVG "polygon" element.
public String toSummaryString(String title){ StringBuffer result; result=new StringBuffer(title); if (title.length() != 0) { result.append("\n"); } result.append(m_Result); return result.toString(); }
returns a summary string of the evaluation with a default title
public static Time convertTime(Value value,Calendar calendar){ if (value == ValueNull.INSTANCE) { return null; } ValueTime t=(ValueTime)value.convertTo(Value.TIME); Calendar cal=(Calendar)calendar.clone(); cal.clear(); cal.setLenient(true); long nanos=t.getNanos(); long millis=nanos / 1000000; nan...
Convert the time to the specified time zone.
public GF2nONBElement(GF2nONBField gf2n,Random rand){ mField=gf2n; mDegree=mField.getDegree(); mLength=gf2n.getONBLength(); mBit=gf2n.getONBBit(); mPol=new long[mLength]; if (mLength > 1) { for (int j=0; j < mLength - 1; j++) { mPol[j]=rand.nextLong(); } long last=rand.nextLong(); mPol...
Construct a random element over the field <tt>gf2n</tt>, using the specified source of randomness.
public boolean isDeleted(){ return isDeleted; }
Returns whether this position has been deleted or not.
public static void logTokenAudience(String idTokenString){ try { GoogleIdToken idToken=GoogleIdToken.parse(jsonFactory,idTokenString); Log.d(TAG,"IDToken Audience:" + idToken.getPayload().getAudience()); } catch ( IOException e) { Log.e(TAG,"IDToken Audience: Could not parse ID Token",e); } }
Print the audience of an unverified token string to the logs.
public final void testEqualsObject05(){ ECFieldF2m f1=new ECFieldF2m(2000); ECFieldF2m f2=new ECFieldF2m(2000,BigInteger.valueOf(0L).setBit(0).setBit(1).setBit(2).setBit(981).setBit(2000)); assertFalse(f1.equals(f2) || f2.equals(f1)); }
Test #5 for <code>equals()</code> method.<br> Assertion: objects equal if their m, and rp are mutually equal.
private void startSlowConsumer(){ if (logger.isTraceEnabled()) { logger.trace(this + "::Sending 1 credit to start delivering of one message to slow consumer"); } sendCredits(1); try { pendingFlowControl.await(10,TimeUnit.SECONDS); } catch ( InterruptedException e) { Thread.currentThread().interr...
Sending an initial credit for slow consumers
public synchronized static void clearWeakReferencesNow(){ LAYOUTS.clear(); }
This method clear any weak references right away instead of waiting for the GC. This might be advantageous if lots of layout are created and disposed of quickly to keep memory consumption down.
public SslSelectFastestProxy(){ requestFileName="getstate.query"; responseFile="getstate.answer"; }
Constructs the test case.
public MPaySelectionCheck(MPaySelectionLine line,String PaymentRule){ this(line.getCtx(),0,line.get_TrxName()); setClientOrg(line); setC_PaySelection_ID(line.getC_PaySelection_ID()); int C_BPartner_ID=line.getInvoice().getC_BPartner_ID(); setC_BPartner_ID(C_BPartner_ID); if (X_C_Order.PAYMENTRULE_DirectDebi...
Create from Line
private boolean moveItemsFromListToSlotOrGround(Player source,String sourcePlayer,String targetPlayer,List<Item> items,RPSlot targetSlot){ final StendhalRPZone zone=player.getZone(); boolean onGround=false; for ( Item item : items) { if (!targetSlot.isFull()) { targetSlot.add(item); new ItemLogge...
moves items from a list into a slot
@SuppressWarnings("unchecked") @Override public void paintIcon(SynthContext context,Graphics g,int x,int y,int w,int h){ SeaGlassPainter painter=null; if (context != null) { painter=(SeaGlassPainter)context.getStyle().get(context,key); } if (painter == null) { painter=(SeaGlassPainter)UIManager.get(pref...
Paints the icon at the specified location.
protected void statementLogError(String message,Throwable error){ Logger.sqlErrorLog(message,error); }
Description: <br>
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
public static String stripFilenameExtension(String path){ if (path == null) { return null; } int extIndex=path.lastIndexOf(EXTENSION_SEPARATOR); if (extIndex == -1) { return path; } int folderIndex=path.lastIndexOf(FOLDER_SEPARATOR); if (folderIndex > extIndex) { return path; } return path...
Strip the filename extension from the given path, e.g. "mypath/myfile.txt" -> "mypath/myfile".
private ProfileSplitterBolt createBolt(String profilerConfig) throws IOException { ProfileSplitterBolt bolt=new ProfileSplitterBolt("zookeeperURL"); bolt.setCuratorFramework(client); bolt.setTreeCache(cache); bolt.getConfigurations().updateProfilerConfig(profilerConfig.getBytes("UTF-8")); bolt.setExecutor(new...
Create a ProfileSplitterBolt to test
public boolean isAllowed(Class<?> c,String displayName){ boolean result; HashSet<String> list; result=true; list=m_Allowed.get(c); if (list != null) { result=list.contains(displayName); } return result; }
returns whether the given property (display name) is allowed for the given class. It only checks for this certain class and no derivative classes. If you also want to check for derivative classes, use <code>isAllowed(Object,String)</code>.
public ServiceEndpoint(String name){ ValidateUtil.validateNotEmpty(name,"name"); this.name=name; }
Creates a ServiceEndpoint with name only.
protected void engineInit(Key key,AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException { char[] passwdChars; byte[] salt=null; int iCount=0; if (key instanceof javax.crypto.interfaces.PBEKey) { javax.crypto.interfaces.PBEKey pbeKey=(javax.crypto.interfaces.PBEKey)key...
Initializes the HMAC with the given secret key and algorithm parameters.
public Object runSafely(Catbert.FastStack stack) throws Exception { java.util.Vector rv=new java.util.Vector(); rv.add(Sage.rez("Default")); if (Sage.WINDOWS_OS) rv.addAll(java.util.Arrays.asList(DShowCaptureDevice.getDevicesInCategory0(DShowCaptureManager.AUDIO_RENDERER_CATEGORY_GUID))); return rv; }
Gets the list of DirectShow audio renderer filters that are available on the system (Windows Only).
protected void printOnewayArrow(float x,float y,double angle){ imageBdr.setColor(UColor.GRAY); imageBdr.setLineStyle(false,displayFactorSym); imageBdr.setAreaFilled(false); drawArrowLine(x,y,displayFactorSym * 10f,angle); drawArrowLine(x,y,displayFactorSym * 7f,angle - Math.PI / 4); drawArrowLine(x,y,displa...
Marks the end of a one-way street with an arrow. The angle specifies the direction, zero means north.
public LTMatrix(String fname) throws FileNotFoundException, IOException { super(fname); }
Creates a lower triangular matrix reading it from file <code>fname</code>.
public Control createControl(final Composite parent){ GridData gridData=null; gridData=new GridData(SWT.FILL,SWT.FILL,true,true); folder=new TabFolder(parent,SWT.NONE); folder.setLayoutData(gridData); final TabItem standard=new TabItem(folder,SWT.NONE); standard.setText("Standard CRS"); final Control stdC...
Creates the CRS PreferencePage root control with no CRS selected
public static void createAllTables(SQLiteDatabase db,boolean ifNotExists){ UserDBDao.createTable(db,ifNotExists); DeviceDBDao.createTable(db,ifNotExists); GroupDBDao.createTable(db,ifNotExists); GroupLocalDeviceDBDao.createTable(db,ifNotExists); GroupCloudDeviceDBDao.createTable(db,ifNotExists); GroupRemove...
Creates underlying database table using DAOs.
public double weightedRecall(){ return weightedTruePositiveRate(); }
Calculates the weighted (by class size) recall.
private void writeToTableAndCsv(TabularResultData metricsTable,String type,String metricName,String metricValue,StringBuilder csvBuilder){ metricsTable.accumulate(CliStrings.SHOW_METRICS__TYPE__HEADER,type); metricsTable.accumulate(CliStrings.SHOW_METRICS__METRIC__HEADER,metricName); metricsTable.accumulate(CliSt...
Writes to a TabularResultData and also appends a CSV string to a String builder
public void addListener(final IDataEnteredListener listener){ enterlisteners.addListener(listener); }
Adds a listener that is notified when the user enters register values through the GUI.
public Matrix4x3d rotateXYZ(double angleX,double angleY,double angleZ){ return rotateXYZ(angleX,angleY,angleZ,this); }
Apply rotation of <code>angleX</code> radians about the X axis, followed by a rotation of <code>angleY</code> radians about the Y axis and followed by a rotation of <code>angleZ</code> radians about the Z axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-cloc...
public AnnotationVisitor visitAnnotationDefault(){ if (mv != null) { return mv.visitAnnotationDefault(); } return null; }
Visits the default value of this annotation interface method.
public void elementDecl(String name,String contentModel,Augmentations augs) throws XNIException { try { if (fDeclHandler != null) { fDeclHandler.elementDecl(name,contentModel); } } catch ( SAXException e) { throw new XNIException(e); } }
An element declaration.
public JAMonArrayComparator(int sortCol,boolean naturalOrder){ addCompareCol(sortCol,naturalOrder); }
Sort/compare the passed in col number starting at 0 in natural (true) or reverse (false) order based on the columns Compareable interface being called.
protected String cleanUpName(String name){ return name.replace('\\','/').trim(); }
Change double backslashes to forward slash, OK for java world.
public String[] readLine(BufferedReader in,int expectedNumberOfColumns) throws IOException { String line=null; while (line == null) { line=in.readLine(); if (line == null) { break; } if (trimLines) { line=line.trim(); } if (commentChars != null) { for (int c=0; c < commentC...
Ignores comment and empty lines and returns the first line not starting with a comment. Returns null if no such line exists. Throws an IOException if the line does not provide the given expected number of columns. This check will not be performed if the given parameter value is -1.
public Vector2 scale(float scale){ return Vector2.scale(this,scale); }
Scales this Vector2 by the value of the argument
@Unpreemptible public static int findCatchBlockForInstruction(int[] eTable,Offset instructionOffset,RVMType exceptionType){ for (int i=0, n=eTable.length; i < n; i+=4) { if (instructionOffset.sGT(Offset.fromIntSignExtend(eTable[i + TRY_START])) && instructionOffset.sLE(Offset.fromIntSignExtend(eTable[i + TRY_END]...
Return the machine code offset for the catch block that will handle the argument exceptionType,or -1 if no such catch block exists.
public void doTest(String folderName,Class<? extends LocalInspectionTool> clazz,boolean onTheFly){ LocalInspectionEP[] extensions=Extensions.getExtensions(LocalInspectionEP.LOCAL_INSPECTION); for ( LocalInspectionEP extension : extensions) { if (extension.implementationClass.equals(clazz.getCanonicalName())) {...
This method looks at the LocalInspectionTool extension points registered in BashSupport's plugin.xml. The base InspectionTestCase doesn't handle inspections well which are only registered in the plugin.xml and which do not have a seperately overridden displayName implementation.
public String toString(){ StringBuffer sb=new StringBuffer("MInOut[").append(get_ID()).append("-").append(getDocumentNo()).append(",DocStatus=").append(getDocStatus()).append("]"); return sb.toString(); }
String representation
public TLAToken Clone(){ TLAToken result=new TLAToken(this.string,this.column,this.type); result.source=this.source; result.beginSubst=(Vector)this.beginSubst.clone(); result.endSubst=(Vector)this.endSubst.clone(); result.isAppended=this.isAppended; return result; }
Modified by LL on 6 Dec 2011 to set the source field too. And on 14 Dec 2011 to set the beginSubst and endSubst fields.
@Override public void discover(AccessProfile accessProfile) throws BaseCollectionException { URI storageSystemId=null; StorageSystem storageSystem=null; String detailedStatusMessage="Unknown Status"; long startTime=System.currentTimeMillis(); _logger.info("ECSCommunicationInterface:discover Access Profile Det...
Get storage pool and storage ports
public int hashCode(){ return (getName().hashCode() ^ mask); }
Returns the hash code value for this object.
public TemplateModelIterator iterator() throws TemplateModelException { synchronized (this) { if (accessed) { throw new TemplateModelException("This collection is stateful and can not be iterated over the" + " second time."); } accessed=true; } return this; }
This allows the iterator to be used in a <tt>&lt;#list&gt;</tt> block.
@Override public synchronized void initialize(){ if (!mRootDirectory.exists()) { if (!mRootDirectory.mkdirs()) { VolleyLog.e("Unable to create cache dir %s",mRootDirectory.getAbsolutePath()); } return; } File[] files=mRootDirectory.listFiles(); if (files == null) { return; } for ( Fil...
Initializes the DiskBasedCache by scanning for all files currently in the specified root directory. Creates the root directory if necessary.
private void showFeedback(String message){ if (myHost != null) { myHost.showFeedback(message); } else { System.out.println(message); } }
Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface.
public SPINStatistics(String label,String queryText,long duration,long startTime,Node context){ this.context=context; this.duration=duration; this.label=label; this.queryText=queryText; this.startTime=startTime; }
Creates a new SPINStatistics object.
@DSComment("constructor") @DSSafe(DSCat.SAFE_OTHERS) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:28:45.940 -0500",hash_original_method="DEDF781BC2901F5DB53B414F0A999CAB",hash_generated_method="BD3934C133084C4C709DEBF2A7930A64") public ContentObserver(Handler handler){ mHandler...
onChange() will happen on the provider Handler.
public ChunkRuleWithContext(String left_context_tag_pattern,String chunk_tag_pattern,String right_context_tag_pattern,String descr){ super(x.Regex("(?<left>" + ChunkerStatic.tag_pattern2re_pattern(left_context_tag_pattern) + ")(?<chunk>"+ ChunkerStatic.tag_pattern2re_pattern(chunk_tag_pattern)+ ")(?<right>"+ ChunkerS...
Construct a new ``ChunkRuleWithContext``.
public void testDuplicatesInIndex() throws IOException { indexFiles("src\\test\\resources\\images","index-large-new",0,true); indexFiles("src\\test\\resources\\images","index-large-new",0,false); indexFiles("src\\test\\resources\\images","index-large-new",0,false); ImageSearcher s=searchers[0]; IndexReader re...
There was an error that images with the same score but different documents in the index were not included in the result list. Here's the test for that.
public void onEvent(Event e){ log.info("Cmd=" + e.getTarget().getId()); if (e.getTarget().getId().equals(ConfirmPanel.A_CANCEL)) { dispose(); return; } else if (e.getTarget() instanceof Tab) { int index=tabbedPane.getSelectedIndex(); genForm.setSelectionActive(index == 0); return; } gen...
Action Listener
void handle8BitRestrictions(Instruction s){ for (Enumeration<Operand> me=s.getMemoryOperands(); me.hasMoreElements(); ) { MemoryOperand mop=(MemoryOperand)me.nextElement(); if (mop.size == 1) { for (Enumeration<Operand> e2=s.getRootOperands(); e2.hasMoreElements(); ) { Operand rootOp=e2.nextElem...
Ensure that if an operand has an 8 bit memory operand that all of its register operands are in 8 bit registers.
public LambdaCounter(Logger logger,int logFrequency,String message){ this(logger,0,logFrequency,message); }
Create a counter that will log only the number of iterations with no total. It expects a message string with a single {} placeholder.
protected void writeElement(Element element) throws IOException { if (newLineAfterNTags == -1) { lazyInitNewLinesAfterNTags(); } if (newLineAfterNTags > 0) { if ((tagsOuput > 0) && ((tagsOuput % newLineAfterNTags) == 0)) { super.writer.write(lineSeparator); } } tagsOuput++; String qualifie...
This override handles any elements that should not remove whitespace, such as &lt;PRE&gt;, &lt;SCRIPT&gt;, &lt;STYLE&gt;, and &lt;TEXTAREA&gt;. Note: the close tags won't line up with the open tag, but we can't alter that. See javadoc note at setPreformattedTags.
@Inline public boolean fastIsLive(ObjectReference object){ if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(!defrag.inDefrag()); return ObjectHeader.testMarkState(object,markState); }
Test the liveness of an object during defragmentation
public boolean doWindowDeActivated(){ return true; }
Method doWindowDeActivated.
public void testTomasFa_2() throws ParseException { checkIntersectionNone("LINESTRING (-5.9 163.1, 76.1 250.7)","LINESTRING (14.6 185.0, 96.6 272.6)"); }
Test from Tomas Fa - JTS list 6/13/2012 Fails using original JTS DeVillers determine orientation test. Succeeds using DD and Shewchuk orientation
public boolean isUploading(Account account,OCFile file){ if (account == null || file == null) return false; String targetKey=buildRemoteName(account,file); synchronized (mPendingUploads) { if (file.isFolder()) { Iterator<String> it=mPendingUploads.keySet().iterator(); boolean found=false; wh...
Returns True when the file described by 'file' is being uploaded to the ownCloud account 'account' or waiting for it If 'file' is a directory, returns 'true' if some of its descendant files is uploading or waiting to upload.
public final boolean equals(final Object aLog){ LogFile oneCell=(LogFile)aLog; return ((getManufacturer().equals(oneCell.getManufacturer())) && (getModel().equals(oneCell.getModel())) && (getRevision().equals(oneCell.getRevision()))&& (getSwid().equals(oneCell.getSwid()))&& (getSwVersion().equals(oneCell.getSwVersi...
used for contains method
@Override public String toString(){ return ("poly(" + degree + ")"); }
Output as String
public static Properties xmlToProperties(InputStream in,Locale locale,Properties properties) throws IOException, InvalidPropertiesFormatException { if (in == null) { throw new IllegalArgumentException("InputStream cannot be null"); } Document doc=null; try { doc=UtilXml.readXmlDocument(in,false,"XML Pro...
Convert XML property file to Properties instance. This method will convert both the Java XML properties file format and the OFBiz custom XML properties file format. <p> The format of the custom XML properties file is:<br /> <br /> <code> &lt;resource&gt;<br /> &nbsp;&lt;property key="key"&gt;<br /> &nbsp;&nbsp;&lt;valu...
public ConnectionGroupTree(UserContext userContext,ConnectionGroup root,List<ObjectPermission.Type> permissions) throws GuacamoleException { this.rootAPIGroup=new APIConnectionGroup(root); retrievedGroups.put(root.getIdentifier(),this.rootAPIGroup); User self=userContext.self(); this.connectionPermissions=self....
Creates a new connection group tree using the given connection group as the tree root.
public boolean lockAddress(final long addr){ m_store.lockAddress(decodeAddr(addr)); return true; }
An assert oriented method that allows a finite number of addresses to be monitored to ensure it is not freed.
private PubsubFuture<Subscription> createSubscription(final String canonicalSubscriptionName,final Subscription subscription){ validateCanonicalSubscription(canonicalSubscriptionName); return put("create subscription",canonicalSubscriptionName,subscription,Subscription.class); }
Create a Pub/Sub subscription.
private void processElements(SBJob parentJob,SBJob job) throws SBException { SBJobApp app=job.getApp(); if (app.isWorkflow()) { SBWorkflow workflow=(SBWorkflow)app; if (CollectionUtils.isEmpty(workflow.getDataLinks())) { createDataLinks(workflow); } } processPorts(parentJob,job,app.getInputs()...
Process Job inputs, outputs and data links
@Override protected void register(ConfigurationCapabilityFactory configurationCapabilityFactory){ configurationCapabilityFactory.registerConfigurationCapability("jo1x",ContainerType.INSTALLED,ConfigurationType.STANDALONE,Jo1xStandaloneLocalConfigurationCapability.class); }
Register configuration capabilities.
private boolean filesystemHasActiveReplication(FileShare fs,StringBuffer notSuppReasonBuff,String deleteType,boolean forceDelete){ if (fs.getPersonality() != null && fs.getPersonality().equalsIgnoreCase(PersonalityTypes.TARGET.name())) { notSuppReasonBuff.append(String.format("File system - %s given in request is...
Checks to see if the file replication change is supported.
public Y isNotNull(){ return add(" IS NOT NULL"); }
SQL: <code>IS NOT NULL</code>
@JsfTest(JsfVersion.JSF_2_2_1) @Test public void testValidateEmptyFields() throws Exception { HtmlPage page=webClient.getPage(webUrl + "faces/index.xhtml"); if (page.getWebResponse().getResponseHeaderValue("Server") == null || !page.getWebResponse().getResponseHeaderValue("Server").startsWith("Apache-Coyote")) { ...
Test to validate empty fields. Note: this test is excluded on Tomcat because the included EL parser requires a System property for this test to work, which would cause problems with other tests. See http://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html and look for COERCE_TO_ZERO
public void startApplication() throws YarnException, IOException { Class<?>[] defaultClasses; if (applicationType.equals(YARN_APPLICATION_TYPE)) { if (UserGroupInformation.isSecurityEnabled()) { defaultClasses=APEX_SECURITY_CLASSES; } else { defaultClasses=APEX_CLASSES; } } else { th...
Launch application for the dag represented by this client.
private void init(){ if (getAxis() == View.Y_AXIS) { children=parseRowColSpec(HTML.Attribute.ROWS); } else { children=parseRowColSpec(HTML.Attribute.COLS); } percentChildren=new int[children.length]; relativeChildren=new int[children.length]; absoluteChildren=new int[children.length]; for (int i=...
Initializes a number of internal state variables that store information about space allocation for the frames contained within the frameset.
public Object parseText(String text){ if (text == null || text.length() == 0) { throw new IllegalArgumentException("The JSON input text should neither be null nor empty."); } return parse(new LineColumnReader(new StringReader(text))); }
Parse a text representation of a JSON data structure
public SimpleNode removeChild(SimpleNode n){ int numChildren=getChildCount(); SimpleNode[] newChild=new SimpleNode[numChildren - 1]; int j=0; boolean found=false; for (int i=0; i < numChildren; i++) { if (child[i] != n) { newChild[j]=child[i]; j++; } else found=true; } if (!found)...
remove child
public JMenuItem createMultiscreenMenuItem(JMenu menu,int screen){ JMenuItem mi=null; if (screen == MultiScreenAction.ALL_SCREENS) { mi=(JMenuItem)menu.add(new JMenuItem(getString("MultiMenu.all_label"))); mi.setMnemonic(getMnemonic("MultiMenu.all_mnemonic")); mi.getAccessibleContext().setAccessibleDesc...
Creates a multi-screen menu item.
public void removeProduct(final Long cid,final Long pid,User user){ Collection collection=read(cid); if (collection == null) { logger.warn("Unknown collection #" + cid); return; } Product product=productDao.read(pid); if (product == null) { logger.warn("Unknown product #" + pid); return; } ...
Remove a product from a collection. The product should stay in the database.
public UnzipJob(File zip,File targetDir) throws IllegalArgumentException { this(zip,targetDir,null); }
Exact equivalent to new UnzipJob(zip, targetDir, null).
public void invokeLater(Runnable r){ queue.add(r); synchronized (this) { if (synchronizer == null) { runQueue(); } else { synchronizer.activate(); } } }
Add a new update to run at any appropriate time.
public MaterialEditText maxLength(int length){ mMaxLength=length; mEditText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(mMaxLength)}); return this; }
Set editText max length
public TodoObject(int id){ this.id=id; }
This method was generated by MyBatis Generator. This method corresponds to the database table todo
public boolean isAssignableTo(Class cl){ return getRawClass().isAssignableTo(cl); }
Returns true if the jClass is assignable to the class.
protected void translateField(DatabaseField sourceField,DatabaseField mappingField,ClassDescriptor clonedDescriptor){ if (sourceField != null) { mappingField.setName(sourceField.getName()); mappingField.setUseDelimiters(sourceField.shouldUseDelimiters()); mappingField.useUpperCaseForComparisons(sourceFiel...
INTERNAL: Apply the field translation from the sourceField to the mappingField.
public void actionPerformed(ActionEvent e){ JFileChooser fc=new JFileChooser(""); fc.setMultiSelectionEnabled(false); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); boolean save=false; int option=0; if (e.getSource() == m_OpenButton) { log.fine("Open Button"); option=fc.showOpenDialog(this); ...
ActionListener - start dialog and set value
public boolean write(byte[] buffer,int offset,int lengthToWrite){ if (lengthToWrite + offset > buffer.length) { throw new IllegalArgumentException("length + offset > buffer.length"); } else if (lengthToWrite <= 0) { throw new IllegalArgumentException("length <= 0"); } final int bufferLength=mBuffer.l...
Attempt to write the specified portion of the provided buffer to the queue. <p/> Returns whether the output was totally written, false if it was closed before.
public static String guessExtensionFromMimeType(String mimeType){ if (mimeType == null || mimeType.isEmpty()) { return null; } return mimeTypeToExtensionMap.get(mimeType); }
Returns the registered extension for the given MIME type. Note that some MIME types map to multiple extensions. This call will return the most common extension for the given MIME type.
public static PlatformUser updatePlatformUser(VOUserDetails userDetails,PlatformUser userToBeUpdated) throws ValidationException, ConcurrentModificationException { validate(userDetails); verifyVersionAndKey(userToBeUpdated,userDetails); copyAttributes(userDetails,userToBeUpdated); return userToBeUpdated; }
Updates all non-key fields in the platform user object to reflect the changes performed in the value object. This method considers the version settings in the value object and stores them in the domain object.
@SuppressWarnings("unchecked") public ClassMap(int initialCapacity){ int initlen; if (initialCapacity > MAXIMUM_CAPACITY) { initlen=MAXIMUM_CAPACITY; } else { initlen=16; while (initlen < initialCapacity) { initlen<<=1; } } this.table=new Entry[initlen]; this.threshold=(int)(initlen *...
Creates new map with given initial capacity.
public void clearState(W window) throws Exception { executableTrigger.invokeClear(contextFactory.base(window,new TestTimers(windowNamespace(window)),executableTrigger,getFinishedSet(window))); }
Instructs the trigger to clear its state for the given window.
protected DTDBuilder(String name){ super(name); }
Create a new DTD.
public static SimpleNode parse(Reader reader,String templateName) throws ParseException { return ri.parse(reader,templateName); }
Parse the input and return the root of AST node structure. <br><br> In the event that it runs out of parsers in the pool, it will create and let them be GC'd dynamically, logging that it has to do that. This is considered an exceptional condition. It is expected that the user will set the PARSER_POOL_SIZE property ...
public IMouseState createNodeHoverState(final Node n,final MouseEvent event){ final CNodeHoverState<NodeType,EdgeType> state=new CNodeHoverState<NodeType,EdgeType>(this,m_graph,n); m_factory.createNodeHoverAction().execute(state,event); return state; }
Creates a new state object after the cursor hovers over a node.