code
stringlengths
10
174k
nl
stringlengths
3
129k
public void commit(Xid xid,boolean onePhase) throws XAException { StringBuilder commandBuf=new StringBuilder(MAX_COMMAND_LENGTH); commandBuf.append("XA COMMIT "); appendXid(commandBuf,xid); if (onePhase) { commandBuf.append(" ONE PHASE"); } try { dispatchCommand(commandBuf.toString()); } finally...
Commits the global transaction specified by xid.
protected ExpressionParsingException(String i18n,Object... arguments){ super(I18N.getErrorMessage(i18n,arguments)); }
Creates a parsing exception with message associated to the i18n and the arguments.
@HLEFunction(nid=0xA0CF2FA4,version=150,checkInsideInterrupt=true) public int __sceSasSetKeyOff(int sasCore,int voice){ checkSasAndVoiceHandlesGood(sasCore,voice); checkVoiceNotPaused(voice,true); voices[voice].off(); return 0; }
Set one voice off.
public IllegalArgumentException(){ super(); }
Constructs an <code>IllegalArgumentException</code> with no detail message.
public void _serializeStruct(PageContext pc,Set test,Struct struct,StringBuilder sb,boolean serializeQueryByColumns,boolean addUDFs,Set<Object> done) throws ConverterException { if (struct instanceof Component) { String res=castToJson(pc,(Component)struct,NULL_STRING); if (res != NULL_STRING) { sb.appen...
serialize a Struct
public CAutomatismPanel(final ZyGraphViewSettings settings,final boolean isDefaultSettingsDialog){ super(new GridLayout(isDefaultSettingsDialog ? NUMBER_OF_ROWS_INITIAL : NUMBER_OF_ROWS,1)); Preconditions.checkNotNull(settings,"IE01583: Settings argument can not be null"); m_isDefaultSettingsDialog=isDefaultSetti...
Creates a new automatism panel.
private void invoiceLine(MRequest request){ MRequestUpdate[] updates=request.getUpdates(null); for (int i=0; i < updates.length; i++) { BigDecimal qty=updates[i].getQtyInvoiced(); if (qty == null || qty.signum() == 0) continue; MInvoiceLine il=new MInvoiceLine(m_invoice); m_linecount++; il.s...
Invoice Line
private String extractDeclaringTypeFQN(CompletionProposal methodProposal){ char[] declaringTypeSignature=methodProposal.getDeclarationSignature(); if (declaringTypeSignature == null) return "java.lang.Object"; return SignatureUtil.stripSignatureToFQN(String.valueOf(declaringTypeSignature)); }
Extracts the fully qualified name of the declaring type of a method reference.
private boolean scanAndSendMessages(){ List<ReleaseMessage> releaseMessages=releaseMessageRepository.findFirst500ByIdGreaterThanOrderByIdAsc(maxIdScanned); if (CollectionUtils.isEmpty(releaseMessages)) { return false; } fireMessageScanned(releaseMessages); int messageScanned=releaseMessages.size(); maxI...
scan messages and send
public PaletteFontChooserPreviewPanel(){ initComponents(); previewLabel.setUI((LabelUI)PaletteLabelUI.createUI(previewLabel)); previewLabel.setBackground(Color.WHITE); previewLabel.setForeground(Color.BLACK); previewLabel.setOpaque(true); setPreferredSize(new Dimension(100,50)); setMinimumSize(new Dimensi...
Creates new form PaletteFontChooserPreviewPanel
public static void dropTable(Database db,boolean ifExists){ String sql="DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SIMPLE_ENTITY\""; db.execSQL(sql); }
Drops the underlying database table.
public static boolean isBadPath(String path){ if (SystemUtilities.isWindows()) { return path.toLowerCase().contains(SystemUtilities.getDataDirectory().toLowerCase()); } return path.contains(SystemUtilities.getDataDirectory()); }
Returns whether or not the supplied path is restricted, such as the qz-tray data directory Warning: This does not follow symlinks
public static int strcmp(String str,char[] a,int start){ int i, d, len=str.length(); for (i=0; i < len; i++) { d=(int)str.charAt(i) - a[start + i]; if (d != 0) { return d; } if (a[start + i] == 0) { return d; } } if (a[start + i] != 0) { return -a[start + i]; } return 0; ...
Compares a string with null terminated char array
private LoggingFactory(){ }
No class
public void searchAllTypeNames(IWorkspace workspace,final char[] packageName,final char[] typeName,final int matchMode,final boolean isCaseSensitive,int searchFor,IJavaSearchScope scope,final ITypeNameRequestor nameRequestor,int waitingPolicy,IProgressMonitor progressMonitor) throws JavaModelException { searchAllType...
Searches for all top-level types and member types in the given scope. The search can be selecting specific types (given a package or a type name prefix and match modes).
public static FunctionAlias newInstanceFromSource(Schema schema,int id,String name,String source,boolean force,boolean bufferResultSetToLocalTemp){ FunctionAlias alias=new FunctionAlias(schema,id,name); alias.source=source; alias.bufferResultSetToLocalTemp=bufferResultSetToLocalTemp; alias.init(force); return...
Create a new alias based on source code.
public static SubscriptionStateException convertToApi(org.oscm.internal.types.exception.SubscriptionStateException oldEx){ org.oscm.internal.types.exception.beans.SubscriptionStateExceptionBean bean=(org.oscm.internal.types.exception.beans.SubscriptionStateExceptionBean)getFaultInfo(oldEx); SubscriptionStateExcepti...
Convert source version Exception to target version Exception
public void reset(){ super.reset(); H0=0x67452301; H1=0xefcdab89; H2=0x98badcfe; H3=0x10325476; H4=0xc3d2e1f0; H5=0x76543210; H6=0xFEDCBA98; H7=0x89ABCDEF; H8=0x01234567; H9=0x3C2D1E0F; xOff=0; for (int i=0; i != X.length; i++) { X[i]=0; } }
reset the chaining variables to the IV values.
public void toBytecode(DataOutputStream out) throws CannotCompileException, IOException { throw new CannotCompileException("not a class"); }
Converts this class to a class file. Once this method is called, further modifications are not possible any more. <p>This method dose not close the output stream in the end.
public Builder noStore(){ this.noStore=true; return this; }
Don't store the server's response in any cache.
private void init(@Nullable final AttributeSet attributeSet){ final TypedArray typedArray=getContext().getTheme().obtainStyledAttributes(attributeSet,R.styleable.CustomLayoutPromptView,0,0); config=new CustomLayoutPromptViewConfig(typedArray); typedArray.recycle(); }
Note: <code>Theme.obtainStyledAttributes</code> accepts a null <code>AttributeSet</code>; see documentation of that method for confirmation.
public int indexOf(double value){ return indexOf(0,value); }
Searches the list front to back for the index of <tt>value</tt>.
@Override public Vertex addVertex(final Object key){ try { final String vid=key != null ? key.toString() : UUID.randomUUID().toString(); final URI uri=factory.toVertexURI(vid); cxn().add(uri,TYPE,VERTEX); return new BigdataVertex(uri,this); } catch ( RuntimeException e) { throw e; } catch ( ...
Add a vertex.
private double logNormalDens(double x,double mean,double stdDev){ double diff=x - mean; return -(diff * diff / (2 * stdDev * stdDev)) - m_normConst - Math.log(stdDev); }
Density function of normal distribution.
protected void addAxioms(final Collection<BigdataStatement> axioms){ super.addAxioms(axioms); final BigdataValueFactory valueFactory=getValueFactory(); axioms.add(valueFactory.createStatement(RDF.TYPE,RDF.TYPE,RDF.PROPERTY,null,StatementEnum.Axiom)); axioms.add(valueFactory.createStatement(RDF.SUBJECT,RDF.TYPE,...
Adds the axioms for RDF Schema.
public void testLegacyIntMissingLast() throws IOException { Directory dir=newDirectory(); RandomIndexWriter writer=new RandomIndexWriter(random(),dir); Document doc=new Document(); writer.addDocument(doc); doc=new Document(); doc.add(new LegacyIntField("value",-1,Field.Store.YES)); writer.addDocument(doc)...
Tests sorting on type legacy int, specifying the missing value should be treated as Integer.MAX_VALUE
public static boolean sendMail(String receiver,String subject,String msg){ String mailCommand="mailx"; String os=System.getProperty("os.name"); if (os != null && os.toUpperCase().contains("WIN")) return false; logger.info("Sending email to " + receiver + " regarding "+ subject); String[] cmd={mailCommand,"-...
A simple mail client to use shell command to send mail
public static void main(String... args){ String testSrc=System.getProperty("test.src"); File baseDir=(testSrc == null) ? null : new File(testSrc); boolean ok=new CheckAttributedTree().run(baseDir,args); if (!ok) { if (testSrc != null) throw new Error("failed"); else System.exit(1); } }
Main entry point. If test.src is set, program runs in jtreg mode, and will throw an Error if any errors arise, otherwise System.exit will be used, unless the gui viewer is being used. In jtreg mode, the default base directory for file args is the value of ${test.src}. In jtreg mode, the -r option can be given to change...
public static void writeLines(File file,Collection<?> lines,String lineEnding,boolean append) throws IOException { writeLines(file,null,lines,lineEnding,append); }
Writes the <code>toString()</code> value of each item in a collection to the specified <code>File</code> line by line. The default VM encoding and the specified line ending will be used.
public Integer loadIdNameParentValues(DbOutputStatement statement,Integer idx) throws Exception { int index=idx.intValue(); if (_logger.isDebugEnabled()) _logger.debug("loadIdNameValues"); _id=statement.getLongInteger(index++); _name=statement.getShortText(index++); _parentId=statement.getLongInteger(index+...
Recupera el identificador, el nombre del departamento y el identificador del padre del departamento
public T pop(){ --size; T item=items[size]; items[size]=null; return item; }
Removes and returns the last item.
@SideEffectFree public XMLStreamException(@Nullable String msg,Location location,@Nullable Throwable th){ super("ParseError at [row,col]:[" + location.getLineNumber() + ","+ location.getColumnNumber()+ "]\n"+ "Message: "+ msg); nested=th; this.location=location; }
Construct an exception with the assocated message, exception and location.
public JSONArray toJSONArray(JSONArray names) throws JSONException { if (names == null || names.length() == 0) { return null; } JSONArray ja=new JSONArray(); for (int i=0; i < names.length(); i+=1) { ja.put(this.opt(names.getString(i))); } return ja; }
Produce a JSONArray containing the values of the members of this JSONObject.
public void clear(){ if (hasChanged) { pages.clear(); } hasChanged=false; }
clear the error page pool
public ElasticSearchTransportClient(String[] hostNames,String clusterName,ElasticSearchEventSerializer serializer){ configureHostnames(hostNames); this.serializer=serializer; openClient(clusterName); }
Transport client for external cluster
public static long multiplyWith8(long n){ return (n << 3); }
Multiplies a number with 8 by performing 3 left shifts.
public boolean hasStartTime(){ return super.hasAttribute(START_TIME); }
Returns whether it has the event start time.
public NATURAL_INNER_JOIN NATURAL_INNER_JOIN(String tableToJoin){ return new NATURAL_INNER_JOIN(this,tableToJoin); }
Add a NATURAL INNER JOIN
public void ignoreNode(){ Node node=getCurrentNode(); if (node != null) { ignoredNodes.add(node); } }
This method adds the current node to the list of 'ignored' nodes. These nodes are irrelant when determining if the business transaction has completed.
private void initInfo(int record_id,String value,String whereClause){ if (!(record_id == 0) && value != null && value.length() > 0) { log.severe("Received both a record_id and a value: " + record_id + " - "+ value); } if (!(record_id == 0)) { fieldID=record_id; } else { if (value != null && value.l...
Dynamic Init
@Override public void run(){ amIActive=true; String inputHeader=null; String outputHeader=null; int col; int row; int numCols; int numRows; int i; int progress; if (args.length <= 0) { showFeedback("Plugin parameters have not been set."); return; } for (i=0; i < args.length; i++) { i...
Used to execute this plugin tool.
public SnippetHighlighter(){ drawsLayeredHighlights=true; }
Creates a new DefaultHighlighther object.
void initFromCameraParameters(Camera camera){ Camera.Parameters parameters=camera.getParameters(); previewFormat=parameters.getPreviewFormat(); previewFormatString=parameters.get("preview-format"); Log.d(TAG,"Default preview format: " + previewFormat + '/'+ previewFormatString); WindowManager manager=(WindowM...
Reads, one time, values from the camera that are needed by the app.
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
@Override public void close(){ panel.dispose(); }
Close the view
public final void pushCurrentNode(int n){ m_currentNodes.push(n); }
Set the current context node.
public NodeSetDTM mutableNodeset() throws javax.xml.transform.TransformerException { error(XPATHErrorResources.ER_CANT_CONVERT_TO_MUTABLENODELIST,new Object[]{getTypeString()}); return (NodeSetDTM)m_obj; }
Cast result object to a nodelist. Always issues an error.
public void cancel(){ this.selectedName.setText(""); this.selectedValue.setText(""); setEditing(false); }
Cancels editing the key-value fields.
public UrlBasedViewResolverRegistration suffix(String suffix){ this.viewResolver.setSuffix(suffix); return this; }
Set the suffix that gets appended to view names when building a URL.
protected IEEE802154Message(){ }
Suppress the default ctor, as the length must always be specified
public static String encodeAll(final String unescaped) throws URIException { return encodeAll(unescaped,URI.getDefaultProtocolCharset()); }
Get the all escaped and encoded string with the default protocl charset. It's the same function to use <code>encode(String unescaped, Bitset empty, URI.getDefaultProtocolCharset())</code>.
public void test_setStartRuleIII(){ SimpleTimeZone st=new SimpleTimeZone(1000,"Test_TZ"); st.setStartRule(Calendar.NOVEMBER,1,1); st.setEndRule(Calendar.DECEMBER,1,1); assertTrue("StartRule improperly set",st.useDaylightTime()); assertTrue("StartRule improperly set",st.inDaylightTime((new GregorianCalendar(19...
java.util.SimpleTimeZone#setStartRule(int, int, int)
protected void complete(){ this.isComplete=true; if (hasNext()) { this.pipeline.taskDispatcher().accept(this.nextTask); } }
Must be explicitely called in each Tasks run method.
public VectorApproximation calculateApproximation(DBID id,V dv){ int[] approximation=new int[dv.getDimensionality()]; for (int d=0; d < splitPositions.length; d++) { final double val=dv.doubleValue(d); final int lastBorderIndex=splitPositions[d].length - 1; if (val < splitPositions[d][0]) { approx...
Calculate the VA file position given the existing borders.
public boolean isSOTrx(){ Object oo=get_Value(COLUMNNAME_IsSOTrx); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; }
Get Sales Transaction.
public static boolean isInHalfPlane(int quad,int halfPlane){ if (halfPlane == SE) { return quad == SE || quad == SW; } return quad == halfPlane || quad == halfPlane + 1; }
Returns whether the given quadrant lies within the given halfplane (specified by its right-hand quadrant).
@Override public void close() throws IOException { PipedInputStream stream=target; if (stream != null) { stream.done(); target=null; } }
Closes this stream. If this stream is connected to an input stream, the input stream is closed and the pipe is disconnected.
public static synchronized LogStream switchLog(final String log){ final File newLog=new File(log); return switchLog(newLog); }
Switch the log to a (usually) different output file.
public void stop(){ if (mExternalCapabilityMonitoring != null) { mCtx.unregisterReceiver(mExternalCapabilityMonitoring); mExternalCapabilityMonitoring=null; } mUpdateExecutor.shutdownNow(); }
Stops extension manager
private void filtro(String valor,ObservableList<Local> listaLocal){ FilteredList<Local> dadosFiltrados=new FilteredList<>(listaLocal,null); dadosFiltrados.setPredicate(null); SortedList<Local> dadosOrdenados=new SortedList<>(dadosFiltrados); dadosOrdenados.comparatorProperty().bind(tbLocal.comparatorProperty())...
Campo de pesquisar para filtrar dados na tabela
public float slotWaste(){ if (usedStore() == 0) return 0.0f; final BigDecimal size=new BigDecimal(reservedStore()); final BigDecimal store=new BigDecimal(100 * (reservedStore() - usedStore())); if (size.signum() == 0) return 0f; return store.divide(size,2,RoundingMode.HALF_UP).floatValue(); }
%SlotWaste: How well the application data fits in the slots (BytesAppData/(SlotsInUse*AllocatorSize)).
public void removeGefaehrdungsBaumChild(IGefaehrdungsBaumElement child){ if (child instanceof CnATreeElement) { removeChild((CnATreeElement)child); } }
removes one child (RisikoMassnahmenUmsetzungen) from the tree
public static int size(final double error){ if (error < 0 && error > 1) { throw new IllegalArgumentException("error should be in [0 .. 1]"); } return (int)(1 / (error * error)); }
Computes the size of the signature required to achieve a given error in similarity estimation. (1 / error^2)
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-03-24 16:07:23.787 -0400",hash_original_method="04EF0EF110937D61EB0AEE30F11FF81B",hash_generated_method="CCC1AA8CF3A7F6B6868B64FFEF5C87C5") private void onDevicePropertyChanged(String deviceObjectPath,String[] propValues){ String name=propVal...
Called by native code on a PropertyChanged signal from org.bluez.Device.
private final double[] prune(Tree tree,NodeRef node,ColourChangeMatrix mm,double[] N){ double[] p=new double[colourCount]; if (tree.isExternal(node)) { p[getColour(node)]=1.0; return p; } NodeRef leftChild=tree.getChild(node,0); NodeRef rightChild=tree.getChild(node,1); double[] left=prune(tree,left...
Calculate probability of data at descendants from node, given a color at the node ('partials'), by a Felsenstein-like pruning algorithm. (First step in the color sampling algorithm) Side effect: updates nodePartials[] for this node and all its descendants.
private synchronized void startImsConnection(){ if (mImsPollingThreadId >= 0) { return; } if (sLogger.isActivated()) { sLogger.info("Start the IMS connection manager"); } mImsPollingThread=new Thread(this); mImsPollingThreadId=mImsPollingThread.getId(); mImsPollingThread.start(); }
Start the IMS connection
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 Collection<Node> matchingScenariosAndExamples(final Feature feature){ final List<ScenarioDefinition> allScenarios=feature.getScenarioDefinitions(); final List<Node> matchingScenariosAndExamples=new LinkedList<Node>(); for ( final ScenarioDefinition scenario : allScenarios) { final Set<Tag> allTagsForS...
Find the scenarios that match the required tags in the feature.
public int maxDoc(){ return maxDoc; }
Returns the maximum document ID this builder can associate with an ordinal
public boolean put(double key,int value){ int i=indexOfInsertion(key); if (i < 0) { i=-i - 1; this.values[i]=value; return false; } if (this.distinct > this.highWaterMark) { int newCapacity=chooseGrowCapacity(this.distinct + 1,this.minLoadFactor,this.maxLoadFactor); rehash(newCapacity); ...
Associates the given key with the given value. Replaces any old <tt>(key,someOtherValue)</tt> association, if existing.
@Override public Object clone(){ return GenericPK.create(this); }
Clones this GenericPK, this is a shallow clone & uses the default shallow HashMap clone
protected final void SSE2_FPCONSTANT(Instruction s){ RegisterOperand res=Binary.getResult(s); Operand val=Binary.getVal2(s); if (val.isFloatConstant() && Float.floatToRawIntBits(val.asFloatConstant().value) == 0) { EMIT(MIR_BinaryAcc.mutate(s,IA32_XORPS,res,res.copyRO())); } else if (val.isDoubleConstant...
Expansion of SSE2 floating point constant loads
protected POInfo initPO(Properties ctx){ POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName()); return poi; }
Load Meta Data
public int variant(){ return variant; }
<p> The variant of the UUID as per <a href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122</a>. <ul> <li>0 - Reserved for NCS compatibility</li> <li>2 - RFC 4122/Leach-Salz</li> <li>6 - Reserved for Microsoft Corporation compatibility</li> <li>7 - Reserved for future use</li> </ul>
public DefaultContext(BridgeContext ctx,Element e){ this.ctx=ctx; this.e=e; }
Creates a new DefaultContext.
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
public int readBuffer(byte[] dst,int offset){ limit+=Length.StatusFlags; int length=mem.getInt(limit); limit+=Length.Metadata; mem.getBytes(limit,dst,offset,length); limit+=recordSize; return length; }
Reads the next buffer of data.
@LogMessageDoc(level="ERROR",message="Failure sending LLDP out port {port} on switch {switch}",explanation="An I/O error occured while sending LLDP message " + "to the switch.",recommendation=LogMessageDoc.CHECK_SWITCH) protected void sendDiscoveryMessage(long sw,short port,boolean isStandard,boolean isReverse){ if (...
Send link discovery message out of a given switch port. The discovery message may be a standard LLDP or a modified LLDP, where the dst mac address is set to :ff. TODO: The modified LLDP will updated in the future and may use a different eth-type.
private void resetTextAnimation(View v){ ViewHelper.setAlpha(v,!mIsMenuOpen ? 0 : 1); ViewHelper.setTranslationX(v,!mIsMenuOpen ? mMenuItemSize : 0); }
Set starting params to text animations
public static CRC check(BitSet msg){ CRC crc=CRC.UNKNOWN; int calculated=1; if (msg.cardinality() % 2 == 0) { for (int i=msg.nextSetBit(0); i >= 0 && i < 48; i=msg.nextSetBit(i + 1)) { calculated^=sCHECKSUMS[i]; } if (calculated == getChecksum(msg)) { crc=CRC.PASSED; } else { cr...
Determines if message bits 0 - 47 pass the Fleetsync CRC checksum contained in bits 48 - 63, using a lookup table of CRC checksum values derived from the CRC-15 value, and verifies the message has even parity
private Object writeReplace() throws java.io.ObjectStreamException { return new KeyRep(KeyRep.Type.SECRET,getAlgorithm(),getFormat(),getEncoded()); }
Replace the DES key to be serialized.
public void updateUI(){ setUI((ViewportUI)UIManager.getUI(this)); }
Resets the UI property to a value from the current look and feel.
public NSDate(byte[] bytes,final int startIndex,final int endIndex){ date=new Date(EPOCH + (long)(1000 * BinaryPropertyListParser.parseDouble(bytes,startIndex,endIndex))); }
Creates a date from its binary representation.
public static <T,P>int detectIndexWith(List<T> list,Predicate2<? super T,? super P> predicate,P parameter){ if (list instanceof RandomAccess) { return RandomAccessListIterate.detectIndexWith(list,predicate,parameter); } return IterableIterate.detectIndexWith(list,predicate,parameter); }
Searches for the first index where the predicate2 and parameter evaluates to true.
private void returnData(Object ret){ if (myHost != null) { myHost.returnData(ret); } }
Used to communicate a return object from a plugin tool to the main Whitebox user-interface.
public void print(int inum){ print(String.valueOf(inum)); }
Prints the string representation of the specified integer to the target.
public ImageSource tiling(boolean tile){ this.tile=tile; return this; }
Enable or disable tiling of the image. This does not apply to preview images which are always loaded as a single bitmap, and tiling cannot be disabled when displaying a region of the source image.
public void pushDirname(File directory){ if (!directory.isDirectory()) { throw new IllegalArgumentException("Only directories may be pushed!"); } mDirectories.insert(directory.getName(),0); mCurrentDir=directory; }
Pushes a directory to the drop down list
public JSONArray put(int index,boolean value) throws JSONException { this.put(index,value ? Boolean.TRUE : Boolean.FALSE); return this; }
Put or replace a boolean value in the JSONArray. If the index is greater than the length of the JSONArray, then null elements will be added as necessary to pad it out.
public static List arrayToList(Object source){ return Arrays.asList(ObjectUtils.toObjectArray(source)); }
Convert the supplied array into a List. A primitive array gets converted into a List of the appropriate wrapper type. <p>A <code>null</code> source value will be converted to an empty List.
public static void assumeNull(Object object,final String assumptionMessage,Object... params){ final boolean cond=object == null; assume(cond,assumptionMessage,params); }
Assumes that given <code>object</code> is null
RangeBase(RangeHolder rangeHolder){ this.rangeHolder=rangeHolder; this.isLessThan=rangeHolder.isLessThan(); this.rangeValues=rangeHolder.getEndPoints(); int len=rangeValues.length; frequencyDist=new FrequencyDistBase[len + 1]; for (int i=0; i < len; i++) { RangeHolder.RangeHolderItem item=rangeHolder.ge...
The first range will catcth anything less than that value.
private TextAnchor textAlignPtForLabelAnchorV(RectangleAnchor anchor){ TextAnchor result=TextAnchor.CENTER; if (anchor.equals(RectangleAnchor.TOP_LEFT)) { result=TextAnchor.TOP_RIGHT; } else if (anchor.equals(RectangleAnchor.TOP)) { result=TextAnchor.TOP_CENTER; } else if (anchor.equals(RectangleA...
Returns the text anchor that is used to align a label to its anchor point.
@Override public String toString(){ return text.toString(); }
Give up the contents of the TextEditor.
private void updateExcludeRelCanonicalRegardingRef(){ for ( Parameter param : paramSet) { if (param.getParameterElement().getParameterElementCode().equals("LEVEL")) { String level=param.getValue().split(";")[0]; if (keepRelCanonicalRefList.contains(level)) { LOGGER.info("Rel canonical pages a...
This method update the relcanonical boolean regarding the referential. For a11y refs, the boolean has to be set to false.
public void componentRemoved(final ContainerEvent e){ final Component child=e.getChild(); if (!(child instanceof JMenu)) return; removeSubmenu((JMenu)child); }
Invoked when a component has been removed from the container.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:49.132 -0500",hash_original_method="9EAB8438172711193BA945D78BF156AE",hash_generated_method="6079F24DCCF84F8A2034CB9B0484C6F5") public InputSource resolveEntity(String publicId,String systemId) throws IOException, SAXException { r...
Resolve an external entity. <p>Always return null, so that the parser will use the system identifier provided in the XML document. This method implements the SAX default behaviour: application writers can override it in a subclass to do special translations such as catalog lookups or URI redirection.</p>
static void writeShort(final byte[] b,final int index,final int s){ b[index]=(byte)(s >>> 8); b[index + 1]=(byte)s; }
Writes a short value in the given byte array.
public static Instance calcPivot(BallNode child1,BallNode child2,Instances insts) throws Exception { Instance p1=child1.getPivot(), p2=child2.getPivot(); double[] attrVals=new double[p1.numAttributes()]; for (int j=0; j < attrVals.length; j++) { attrVals[j]+=p1.value(j); attrVals[j]+=p2.value(j); attr...
Calculates the centroid pivot of a node based on its two child nodes (if merging two nodes).
private DateTime createNextRecurringDateTime(final String recurrencePattern,final DateTime startDateTime){ DateTime nextRecurringDateTime=null; if (StringUtils.isNotBlank(recurrencePattern) && startDateTime != null) { final LocalDate nextDayLocalDate=startDateTime.plus(1).toLocalDate(); final LocalDate next...
create the next recurring DateTime from recurrence pattern, start DateTime and current DateTime