code
stringlengths
10
174k
nl
stringlengths
3
129k
protected void extendElement(Element e){ }
Customizable method if you need to add anything more
public void regenerate(Projection proj){ Debug.message("eomg","EditableOMGraphicList.regenerate()"); for ( EditableOMGraphic eomg : getEditables()) { eomg.regenerate(proj); } if (gpm != null) gpm.generate(proj); }
Given a new projection, the grab points may need to be repositioned off the current position of the graphic. Called when the projection changes.
public void send(String kafkaTopic,String value){ JsonObject obj=new JsonObject().put(ConfigConstants.VALUE_FIELD,value).put(ConfigConstants.TOPIC_FIELD,kafkaTopic).put(TYPE_FIELD,MessageType.CUSTOM_TOPIC.value); send(obj); }
Send a message to a specific topic
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
private void deleteBreakpoint(final VirtualFile activeFile,final Breakpoint breakpoint){ doDeleteBreakpoint(breakpoint); for ( BreakpointManagerObserver observer : observers) { observer.onBreakpointDeleted(breakpoint); } Debugger debugger=debuggerManager.getActiveDebugger(); if (debugger != null) { d...
Deletes breakpoint from the list and JVM. Removes breakpoint mark.
private static Set<String> tokenizer(String string){ HashSet<String> tokens=new HashSet<String>(); if (string != null && !string.equals("")) { String tok[]=string.toLowerCase().split("([^a-z0-9])"); for ( String t : tok) { if (t.length() < 3) { continue; } if (t.matches(numPatte...
Implementation of the tokenization process based on the URL-String. A set of tokens (unique) is returned.
public CircuitBreakerBuilder circuitOpenWindowMillis(long circuitOpenWindowMillis){ circuitOpenWindow(Duration.ofMillis(circuitOpenWindowMillis)); return this; }
Sets the duration of OPEN state.
@Override public boolean service(RequestBaratine request){ request.status(HttpStatus.INTERNAL_SERVER_ERROR); request.header("content-type","text/plain"); if (_exn instanceof ConfigException) { request.write("ConfigException: " + _exn.getMessage()); } else { request.write(_exn.toString()); request.w...
Service a request.
static String classNameOf(TypeElement type){ String name=type.getQualifiedName().toString(); String pkgName=packageNameOf(type); return pkgName.isEmpty() ? name : name.substring(pkgName.length() + 1); }
Returns the name of the given type, including any enclosing types but not the package.
private void showNextView(){ try { FormController formController=Collect.getInstance().getFormController(); String constraint_behavior=PreferenceManager.getDefaultSharedPreferences(this).getString(PreferencesActivity.KEY_CONSTRAINT_BEHAVIOR,PreferencesActivity.CONSTRAINT_BEHAVIOR_DEFAULT); if (formControl...
Determines what should be displayed on the screen. Possible options are: a question, an ask repeat dialog, or the submit screen. Also saves answers to the data model after checking constraints.
public void bratRender(AjaxRequestTarget aTarget,JCas aJCas){ aTarget.appendJavaScript(bratRenderCommand(aJCas)); }
Render content as part of the current request.
@Override public void onStartTrackingTouch(SeekBar seekBar){ mDragging=true; mHandler.removeMessages(SHOW_PROGRESS); }
Called in devices with touchpad when the user starts to adjust the position of the seekbar's thumb. Will be followed by several onProgressChanged notifications.
public void importMemory(String location){ }
Allow import of another memory location.
private List<Token> tokenizeMalformed(String url,URLPart part) throws IOException { if (part == null) { return tokenizePartsMalformed(url,ImmutableList.copyOf(URLPart.values())); } Optional<String> partOptional=getPart(url,part); if (!partOptional.isPresent() || partOptional.get().equals("")) { return n...
Attempt to tokenize the given malformed URL.
private void handleEnumerationRequest(EnumerationCreationContext aws){ switch (aws.stage) { case CLIENT: getAWSAsyncClient(aws,AWSEnumerationCreationStages.ENUMERATE); break; case ENUMERATE: switch (aws.computeEnumerationRequest.enumerationAction) { case START: logInfo("Started enumeration for creation for %s",...
Handles the different steps required to hit the AWS endpoint and get the set of resources available and proceed to update the state in the local system based on the received data.
@Override public int compareTo(Object o1){ int result; if (o1 instanceof Quarter) { Quarter q=(Quarter)o1; result=this.year - q.getYearValue(); if (result == 0) { result=this.quarter - q.getQuarter(); } } else if (o1 instanceof RegularTimePeriod) { result=0; } else { result=1; ...
Returns an integer indicating the order of this Quarter object relative to the specified object: negative == before, zero == same, positive == after.
private <T>String elementToString(JAXBElement<T> element) throws Exception { StringWriter writer=new StringWriter(); marshaller.marshal(element,writer); return writer.toString(); }
Serializes the given XML element to a string.
public static String showDialog(final Component component,final String title,final Object message,final String... buttons){ return showDialog(JOptionPane.getFrameForComponent(component),title,message,JOptionPane.PLAIN_MESSAGE,buttons); }
Show a new modal dialog and block until the user press a button of closes the dialog
public static int rangeBracket(int distance,int[] ranges,boolean useExtremeRange,boolean useLOSRange){ int range; if (null == ranges) { range=RANGE_OUT; } else if (distance > ranges[RANGE_EXTREME]) { if (useLOSRange) { range=RANGE_LOS; } else { range=RANGE_OUT; } } else if (di...
Returns the range bracket a distance falls into.
public void addPlugInPatternGuard(String namespace,String name,String guardFactoryClass){ ConfigurationPlugInPatternObject entry=new ConfigurationPlugInPatternObject(); entry.setNamespace(namespace); entry.setName(name); entry.setFactoryClassName(guardFactoryClass); entry.setPatternObjectType(ConfigurationPlu...
Add a pattern guard for plug-in.
private void cleanup(){ getPreferenceManager().unregisterOnActivityStopListener(this); if (mSeekBarVolumizer != null) { Dialog dialog=getDialog(); if (dialog != null && dialog.isShowing()) { View view=dialog.getWindow().getDecorView().findViewById(com.android.internal.R.id.seekbar); if (view != ...
Do clean up. This can be called multiple times!
private static double[] chordLengthParameterize(ArrayList<Point2D.Double> d,int first,int last){ int i; double[] u; u=new double[last - first + 1]; u[0]=0.0; for (i=first + 1; i <= last; i++) { u[i - first]=u[i - first - 1] + v2DistanceBetween2Points(d.get(i),d.get(i - 1)); } for (i=first + 1; i <= la...
Assign parameter values to digitized points using relative distances between points.
protected void parseNames(){ while (reader.hasNextCharacter()) { final char character=next(); if (Strings.isWhitespace(character)) { addName(); continue; } else if (character == blockOpening) { addName(); break; } else { builder.append(character); } } if (Gd...
Parses names proceeding styles block.
public synchronized void removeAllElements(){ for (int i=0; i < elementCount; i++) { elementData[i]=null; } modCount++; elementCount=0; }
Removes all elements from this vector, leaving the size zero and the capacity unchanged.
public static void validateCertificate(X509Certificate cert){ try { cert.checkValidity(); } catch ( Exception e) { logAndThrow(String.format("Certificate is not valid: %s",e.getMessage())); } }
Checks validity of the given certificate.
public void testWithoutClass(){ Instances icopy=new Instances(m_Instances); Instances result=null; try { m_Filter.setInputFormat(icopy); } catch ( Exception ex) { ex.printStackTrace(); fail("Exception thrown on setInputFormat(): \n" + ex.getMessage()); } try { result=Filter.useFilter(icopy...
a typical test, w/o class attribute.
public void generate(){ if (!this.upToDate) { Symbol head=this.symbols[0]; Symbol next; Symbol previous=head; Symbol symbol; this.table=null; head.next=null; for (int i=1; i < this.domain; i+=1) { symbol=symbols[i]; if (symbol.weight < head.weight) { symbol.next=head; ...
Generate the encoding/decoding table. The table determines the bit sequences used by the read and write methods.
@DataProvider(name="RangeVersusCalendar") Object[][] provider_rangeVersusCalendar(){ return new Object[][]{{LocalDate.of(1583,1,1),LocalDate.of(2100,1,1)}}; }
Range of years to check consistency with java.util.Calendar
private void loadHeuristics(){ Document document=Utils.loadXMLDoc(HEURISTICS_CONF); _heuristicsConfData=new HeuristicConfiguration(document.getDocumentElement()).getHeuristicsConfigurationData(); for ( HeuristicConfigurationData data : _heuristicsConfData) { try { Class<?> heuristicClass=Play.current()...
Load all the heuristics and their views configured in HeuristicConf.xml
@Override protected boolean accepts(final IProjectDescription desc){ return desc.hasNature(WorkbenchHelper.PLUGIN_NATURE); }
Method accepts()
public boolean isInteriorAreaEdge(){ boolean isInteriorAreaEdge=true; for (int i=0; i < 2; i++) { if (!(label.isArea(i) && label.getLocation(i,Position.LEFT) == Location.INTERIOR && label.getLocation(i,Position.RIGHT) == Location.INTERIOR)) { isInteriorAreaEdge=false; } } return isInteriorAreaEdge...
This is an interior Area edge if <ul> <li> its label is an Area label for both Geometries <li> and for each Geometry both sides are in the interior. </ul>
public LineMarkerInfo(@NotNull T element,int startOffset,Icon icon,int updatePass,@Nullable Function<? super T,String> tooltipProvider,@Nullable GutterIconNavigationHandler<T> navHandler){ this(element,startOffset,icon,updatePass,tooltipProvider,navHandler,GutterIconRenderer.Alignment.RIGHT); }
Creates a line marker info for the element.
public XMLApiResult doExport(final StorageSystem system,StorageHADomain dataMover,List<VNXFileExport> exports,List<String> newPaths,FileObject fileObject,String fsId,boolean firstExport) throws VNXException { VNXFileExport vnxExp=exports.get(0); String port=vnxExp.getStoragePortName(); String storagePortNetworkId...
Performs an export for a VNX File array. If this is the first export of a file system path, then the path must be mounted on a data mover first. Also, if the root user mapping contains a user account name, then it must be converted into a UID.
public void test_ConstructorLjava_lang_StringLjava_lang_StringLjava_lang_String(){ assertNotNull(new MissingResourceException("Detail string","Class name string","Key string")); assertNotNull(new MissingResourceException(null,"Class name string","Key string")); assertNotNull(new MissingResourceException("Detail s...
java.util.MissingResourceException#MissingResourceException(java.lang.String, java.lang.String, java.lang.String)
public void selectTabWithId(@IdRes int tabResId){ int tabPosition=findPositionForTabWithId(tabResId); selectTabAtPosition(tabPosition); }
Select the tab with the corresponding id.
public boolean nextNndn(){ return nextElement(RDE_NNDN_URI,"NNDN"); }
Advances parser to the next NNDN element. <p>The parser may skip over other types of elements while advancing to the next NNDN element.
private static List<Agent> prepareContributorsFromEmlAgents(List<Agent> contacts,List<Agent> metadataProviders,List<Agent> associatedParties){ List<Agent> ls=Lists.newArrayList(); for ( Agent contact : contacts) { contact.setRole(CONTACT_ROLE); } ls.addAll(contacts); for ( Agent metadataProvider : metad...
DataCite contributors are created from the combined set of EML contact, metadataProvider and associatedParty agents. MetadataProvider and Contact Agents don't have a role, so set. The role is converted to DataCite ContributorType in later processing.
public void writeRoom(String number,String contact,String message,int mode) throws Exception { writeRoom(number,contact,new XmppMsg(message),mode); }
Writes a message to a room and creates the room if necessary, followed by an invite to the default notification address to join the room
protected void makeOutputStructure() throws Exception { if (m_matchRules.size() > 0) { int labelCount=0; HashSet<String> uniqueLabels=new HashSet<String>(); Vector<String> labelVec=new Vector<String>(); for ( SubstringLabelerMatchRule m : m_matchRules) { if (m.getLabel() != null && m.getLabel...
Make the output instances structure
public static _Fields findByName(String name){ return BY_NAME.get(name); }
Find the _Fields constant that matches name, or null if its not found.
@Override public boolean checkAndMutate(byte[] row,byte[] family,byte[] qualifier,CompareFilter.CompareOp compareOp,byte[] value,RowMutations mutation) throws IOException { return false; }
Atomically checks if a row/family/qualifier value matches the expected value. If it does, it performs the row mutations. If the passed value is null, the check is for the lack of column (ie: non-existence)
public static SimpleDateFormat makeOutputFormatter(){ SimpleDateFormat fmt=new SimpleDateFormat(DEFAULT_OFORMAT); fmt.setTimeZone(GMT_ZONE); return (fmt); }
Make a formatter for the default format and the GMT timezone. The output formatter appends the trailing Z.
private static void swap(short[] x,int a,int b){ short t=x[a]; x[a]=x[b]; x[b]=t; }
Swaps x[a] with x[b].
@SuppressWarnings({"rawtypes","unchecked"}) @Test public void testNodeProcessing(){ Max<Double> oper=new Max<Double>(); CollectorTestSink rangeSink=new CollectorTestSink(); oper.max.setSink(rangeSink); oper.beginWindow(0); Double a=2.0; Double b=20.0; Double c=1000.0; oper.data.process(a); oper.data.p...
Test operator logic emits correct results.
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 final static void initializeClassLoader(ClassLoader loader,boolean bootLoader){ throw new Error("TODO"); }
Initialize the classloader.
public void initCPTs() throws Exception { m_BayesNetEstimator.initCPTs(this); }
initializes the conditional probabilities
public String header(String name){ return headers.get(name); }
Returns the message header by given header name.
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.
private synchronized void initResourceBundle(String resourceBundleName){ String current=this.resourceBundleName; if (current != null) { if (current.equals(resourceBundleName)) { return; } else { throw new IllegalArgumentException("Resource bundle name '" + resourceBundleName + "' is inconsisten...
Initializes this logger's resource bundle.
public GetRequest(ActionRequest request,String index){ super(request,index); }
Constructs a new get request starting from the provided request, meaning that it will inherit its headers and context, and against the specified index.
public DoubleProperty amplitudeProperty(){ return amplitude; }
The amplitude. The minimum value is 1. If this value is < 1 it will be set to 1 during animation.
protected void sequence_AnnotatedScriptElement(ISerializationContext context,N4EnumDeclaration semanticObject){ genericSequencer.createSequence(context,semanticObject); }
Contexts: AnnotatedScriptElement returns N4EnumDeclaration Constraint: ( annotationList=AnnotatedScriptElement_N4EnumDeclaration_1_4_0 declaredModifiers+=N4Modifier* name=BindingIdentifier literals+=N4EnumLiteral literals+=N4EnumLiteral )
public AlphaBetaEvaluation(int ply){ this.ply=ply; }
Create an evaluator with the given state. It is important that the same player evaluate the board regardless of MIN and MAX. The player will be known when <code>bestMove</code> is invoked.
public MediaType withParameters(Multimap<String,String> parameters){ return create(type,subtype,parameters); }
<em>Replaces</em> all parameters with the given parameters.
public Matrix4d m03(double m03){ this.m03=m03; properties=0; return this; }
Set the value of the matrix element at column 0 and row 3
public static String convertToARGB(int color){ String alpha=Integer.toHexString(Color.alpha(color)); String red=Integer.toHexString(Color.red(color)); String green=Integer.toHexString(Color.green(color)); String blue=Integer.toHexString(Color.blue(color)); if (alpha.length() == 1) { alpha="0" + alpha; }...
For custom purposes. Not used by ColorPickerPreferrence
public static void main(final String[] args){ DOMTestCase.doMain(nodeissupported04.class,args); }
Runs this test from the command line.
private void computeWordProposals(String word,int offset,List propositionList){ int qualifierLength=word.length(); for (int i=0; i < proposals.length; i++) { String proposalText=proposals[i]; if (proposalText.startsWith(word)) { String text=proposalText + " "; int cursor=proposalText.length(); ...
Syntax-based proposal based for word beginning
protected String handleObject(Object obj){ return obj == null ? "" : String.valueOf(obj); }
changes an object to a String.
private void updateAppOffer(Offer offer){ offerModel.addAppOffer(offer); view.displayAppOffer(offer); }
Update the model and the view when a new offer should be added to app offer section.
public void addSubtitleFileTypes(String type){ if (!type.startsWith(".")) { type="." + type; } if (!subtitleFileTypes.contains(type)) { subtitleFileTypes.add(type); firePropertyChange(SUBTITLE_FILE_TYPE,null,subtitleFileTypes); } }
Adds the subtitle file types.
public DOMCharacterDataModifiedEventListener(){ }
Creates a new DOMCharacterDataModifiedEventListener.
public boolean addChildPlanet(DimensionProperties child){ if (child == this) return false; childPlanets.add(child.getId()); child.setParentPlanet(this); return true; }
Does not check for hierarchy loops!
public T caseFunctionDefinition(FunctionDefinition object){ return null; }
Returns the result of interpreting the object as an instance of '<em>Function Definition</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
protected boolean afterSave(boolean newRecord,boolean success){ if (!newRecord) updateRunHeader(); return success; }
After Save
public final ISchedulingRule buildRule(){ return workspace.getRoot(); }
Default implementation of <code>IResourceRuleFactory#buildRule</code>. This default implementation always returns the workspace root. <p> Subclasses may not currently override this method.
public long cursorAllocate(){ long cursorId=this.nextCursorId.incrementAndGet(); ArrayCursor cursor=new ArrayCursor(); cursor.id=cursorId; cursor.index=0; openCursors.put(cursorId,cursor); return cursorId; }
Allocates a new cursor that may be used to read this array and returns the cursor id.
private RoundUtils(){ }
Creates a new instance of DoubleUtils
public boolean hasHiddenFormTypeField(){ boolean found=false; for ( FormField f : fields) { if (f.getVariable().equals("FORM_TYPE") && f.getType() != null && f.getType().equals("hidden")) found=true; } return found; }
Returns true if this DataForm has at least one FORM_TYPE field which is hidden. This method is used for sanity checks.
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.paint=SerialUtilities.readPaint(stream); this.stroke=SerialUtilities.readStroke(stream); this.labelPaint=SerialUtilities.readPaint(stream); this.labelBackgroundPaint=SerialUtilities....
Provides serialization support.
public final void addStrategy(final PlanStrategy strategy,final String subpopulation,final double weight){ delegate.addStrategy(strategy,subpopulation,weight); }
Adds a strategy to this manager with the specified weight. This weight compared to the sum of weights of all strategies in this manager defines the probability this strategy will be used for an agent.
protected CRLDistributionPointsExtension(ObjectIdentifier extensionId,boolean isCritical,List<DistributionPoint> distributionPoints,String extensionName) throws IOException { this.extensionId=extensionId; this.critical=isCritical; this.distributionPoints=distributionPoints; encodeThis(); this.extensionName=ex...
Creates the extension (also called by the subclass).
private long toLong(InetAddress inetAddress){ byte[] address=inetAddress.getAddress(); long result=0; for (int i=0; i < address.length; i++) { result<<=8; result|=address[i] & BYTE_MASK; } return result; }
Converts an IP address into a long
public boolean isAdvanceLineVisible(){ return this.advanceLineVisible; }
The advance line is the line drawn at the limit of the current cycle, when erasing the previous cycle.
private void rehash(){ int oldCapacity=table.length; Entry oldMap[]=table; int newCapacity=oldCapacity * 2 + 1; Entry newMap[]=new Entry[newCapacity]; threshold=(int)(newCapacity * loadFactor); table=newMap; for (int i=oldCapacity; i-- > 0; ) { for (Entry old=oldMap[i]; old != null; ) { Entry e=...
Rehashes this map into a new map with a large number of buckets. It is called when the number of entries in the map exceeds the capacity and load factor.
private void updateProgress(int progress){ if (myHost != null && progress != previousProgress) { myHost.updateProgress(progress); } previousProgress=progress; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
public UnableToControlProcessException(final String message){ super(message); }
Creates a new <code>UnableToControlProcessException</code>.
public boolean equals(Object obj){ if (obj == this) { return true; } if (!(obj instanceof BollingerBandsDataset)) { return false; } BollingerBandsDataset that=(BollingerBandsDataset)obj; if (!this.xPosition.equals(that.xPosition)) { return false; } return ObjectUtilities.equal(this.data,that...
Tests this instance for equality with an arbitrary object.
public final double tanHalfAngle(){ return Math.tan(0.5 * this.radians); }
Obtains the tangent of half of this angle.
public boolean execute(IRequestProcessor requestProcessor,IEventSender eventSender,ICvsListenerRegistry listenerRegistry,IClientEnvironment clientEnvironment,IProgressViewer progressViewer) throws CommandException, AuthenticationException { final ExpandedModules expandedModules=new ExpandedModules(); if (!expandMod...
Execute this command.
private static void initializeHotkeys(){ final InputMap map=(InputMap)UIManager.get("SplitPane.ancestorInputMap"); map.remove(HotKeys.GUI_INITIALIZER_KEY_1.getKeyStroke()); map.remove(HotKeys.GUI_INITIALIZER_KEY_2.getKeyStroke()); }
This function unregisters the keys F6 and F8 from JSplitPane components because we would rather uses these keys for debugger functions.
@Override public String toString(){ String ret=null; boolean local=checkSetup(); if (local) { Transaction tx=null; try { tx=this.txmgr.getTransaction(); } catch ( SystemException e) { String msg="Error getting transaction"; LOGGER.logWarning(msg,e); } if (tx != null) ...
Overrides the default behaviour, to allow retrieving the corresponding transaction at the server side.
public FacebookSdkNotInitializedException(String message){ super(message); }
Constructs a FacebookSdkNotInitializedException with a message.
public DateColumn(Class type,int nrows){ this(type,nrows,nrows,0L); }
Create a new DateColumn.
public static void swipeUpAfter(AppiumDriver driver,AugmentedFunctions<?> augmentedFunctions,By swipeBy,int waitTimeInSeconds,int pressInMilliSeconds){ Preconditions.checkNotNull(driver); Preconditions.checkNotNull(augmentedFunctions); Preconditions.checkNotNull(swipeBy); swipeVerticalAfter(driver,augmentedFunc...
Swipes up on an element, pressing a default amount of time before swiping.
public boolean containsKey(Object key){ return getEntry(key) != null; }
Returns <tt>true</tt> if this map contains a mapping for the specified key.
public List<Datum> contextualOutlierDetection(List<ContextualDatum> data,Context context) throws Exception { BitSet bs=context.getContextualBitSet(data,context2BitSet); context2BitSet.put(context,bs); List<Datum> contextualData=null; Context p1=(context.getParents().size() > 0) ? context.getParents().get(0) : n...
Run outlier detection algorithm on contextual data The algorithm has to static threhold classifier
public String attributeIndexTipText(){ return "Index of the attribute that is to changed."; }
Returns the tip text for this property
public static <E>ImmutableList<E> of(E e1,E e2,E e3,E e4,E e5,E e6,E e7,E e8,E e9,E e10){ return construct(e1,e2,e3,e4,e5,e6,e7,e8,e9,e10); }
Returns an immutable list containing the given elements, in order.
StoreReadWriteMmapNio(StoreBuilder builder){ _path=builder.getPath(); _rampManager=builder.ampManager(); Objects.requireNonNull(_path); Objects.requireNonNull(_rampManager); FsyncImpl fsyncImpl=new FsyncImpl(); StoreFsyncServiceImpl fsyncServiceImpl=new StoreFsyncServiceImpl(fsyncImpl); _fsyncService=getR...
Creates a new store.
public void testSetF11(){ boolean f11=false; AbstractThrottle instance=new AbstractThrottleImpl(); instance.setF11(f11); jmri.util.JUnitAppender.assertErrorMessage("sendFunctionGroup3 needs to be implemented if invoked"); }
Test of setF11 method, of class AbstractThrottle.
private void confirmAndForceAction(final Long actionId){ final ConfirmationDialog confirmDialog=new ConfirmationDialog(i18n.get("caption.force.action.confirmbox"),i18n.get("message.force.action.confirm"),i18n.get(BUTTON_OK),i18n.get(BUTTON_CANCEL),null); UI.getCurrent().addWindow(confirmDialog.getWindow()); confi...
Show confirmation window and if ok then only, force the action.
protected boolean matchPropertyName(java.beans.PropertyChangeEvent e){ return ((e.getPropertyName().indexOf("Comment") >= 0) || (e.getPropertyName().indexOf("Enable") >= 0)); }
Is this property event announcing a change this table should display? <P> Note that events will come both from the NamedBeans and also from the manager
private DefaultSelectorProvider(){ }
Prevent instantiation.
public void clearLogFiles(Context context){ File logDir=createFileLogDirIfNeeded(context); logDir.delete(); }
Clear log files.
protected boolean traverse(Tree tree,NodeRef node){ boolean update=false; int nodeNum=node.getNumber(); NodeRef parent=tree.getParent(node); if (parent != null && updateNode[nodeNum]) { final double branchRate=branchRateModel.getBranchRate(tree,node); final double parentNodeHeight=tree.getNodeHeight(par...
Traverse the tree calculating partial likelihoods.
public void cloneClassClassifications(SootClass original,SootClass clone){ if (isSystemClass(original)) { addSystemClass(clone); } if (isContainerClass(original.getName())) addContainerClass(clone); if (Project.v().isSrcClass(original)) { Project.v().addSrcClass(clone); } if (Project.v().isGenClas...
If adding a class that is a clone, make sure to add the clone to the correct maps, as guided by the original class.
@operator(value="generate_barabasi_albert",concept={IConcept.ALGORITHM}) @doc(value="returns a random scale-free network (following Barabasi-Albert (BA) model).",comment="The Barabasi-Albert (BA) model is an algorithm for generating random scale-free networks using a preferential attachment mechanism. " + "A scale-free...
TODO this version of the barabasi albert generator is too simple. Switch to the implementation of another library.
private HashMapEntry<K,V>[] makeTable(int newCapacity){ @SuppressWarnings("unchecked") HashMapEntry<K,V>[] newTable=(HashMapEntry<K,V>[])new HashMapEntry[newCapacity]; table=newTable; threshold=(newCapacity >> 1) + (newCapacity >> 2); return newTable; }
Allocate a table of the given capacity and set the threshold accordingly.