code
stringlengths
10
174k
nl
stringlengths
3
129k
public static boolean hasNfc(final Context context){ if (Build.VERSION.SDK_INT > Build.VERSION_CODES.GINGERBREAD_MR1) { final NfcManager manager=(NfcManager)context.getSystemService(Context.NFC_SERVICE); final NfcAdapter adapter=manager.getDefaultAdapter(); return (adapter != null && adapter.isEnabled());...
Tests if the device has NFC capability.
private void process(){ log.fine("Start Rows=" + m_rows.size()); int gSize=groups.size(); int[] groupBys=new int[gSize]; Object[] groupBysValue=new Object[gSize]; Object INITVALUE=new Object(); for (int i=0; i < gSize; i++) { groupBys[i]=groups.get(i).intValue(); groupBysValue[i]=INITVALUE; log....
Process Data Copy data in m_rows to rows and perform functions
public void loadUrl(String url,JSONObject props) throws JSONException { LOG.d("App","App.loadUrl(" + url + ","+ props+ ")"); int wait=0; boolean openExternal=false; boolean clearHistory=false; HashMap<String,Object> params=new HashMap<String,Object>(); if (props != null) { JSONArray keys=props.names(); ...
Load the url into the webview.
public void or(Criteria criteria){ oredCriteria.add(criteria); }
This method was generated by MyBatis Generator. This method corresponds to the database table PUBLIC.SAMPLETABLE1
public XmlReplacement(String file,String xpathExpression,String attributeName,Boolean ignoreIfNonExisting,String value){ this.file=file; this.xpathExpression=xpathExpression; this.attributeName=attributeName; this.ignoreIfNonExisting=ignoreIfNonExisting; this.value=value; }
Saves the attributes for this XML replacement.
public boolean isEmpty(){ return parameters.isEmpty(); }
Determine whether or not this list is empty.
public static boolean vPoolSpecifiesFileReplication(final VirtualPool virtualPool){ return (virtualPool.getFileReplicationType() != null && FileReplicationType.validFileReplication(virtualPool.getFileReplicationType())); }
Returns whether or not the passed VirtualPool specifies Protection
public void bar(@Nullable Object o){ }
the only difference with DoesntWork.foo() is that the parameter is annotated as Nullable
private void initAtpTab(){ m_tableAtp=ListboxFactory.newDataTable(); m_tableAtp.setMultiSelection(false); ArrayList<Info_Column> list=new ArrayList<Info_Column>(); list.add(new Info_Column(" ","M_Product_ID",IDColumn.class)); list.add(new Info_Column(Msg.translate(Env.getCtx(),"M_Warehouse_ID"),"Warehouse",St...
Query ATP
public static int listFindNoCase(String list,String value,String delimiter,boolean trim){ Array arr=trim ? listToArrayTrim(list,delimiter) : listToArray(list,delimiter); int len=arr.size(); for (int i=1; i <= len; i++) { if (((String)arr.get(i,"")).equalsIgnoreCase(value)) return i - 1; } return -1; }...
finds a value inside a list, do not ignore case
public TargetInformationReply(final int packetId,final int errorCode,final TargetInformation targetInformation){ super(packetId,errorCode); if (success()) { Preconditions.checkNotNull(targetInformation,"IE01053: Target information argument can not be null"); } else { if (targetInformation != null) { ...
Creates a new target information reply.
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 Document read(File file) throws DocumentException, IOException, XmlPullParserException { String systemID=file.getAbsolutePath(); return read(new BufferedReader(new FileReader(file)),systemID); }
<p> Reads a Document from the given <code>File</code> </p>
public void dequeueGroupFileInfo(String fileTransferId,String fileInfo,boolean displayedReportEnabled,boolean deliveredReportEnabled,GroupFileTransferImpl groupFileTransfer) throws PayloadException, NetworkException, SessionNotEstablishedException { GroupChatSession session=mImService.getGroupChatSession(mChatId); ...
Dequeue group file info
public static void parser(PrintStream out,parse_action_table action_table,parse_reduce_table reduce_table,int start_st,production start_prod,boolean compact_reduces) throws internal_error { long start_time=System.currentTimeMillis(); out.println(); out.println("//--------------------------------------------------...
Emit the parser subclass with embedded tables.
public void addVideoSharingInvitationRejected(ContactId contact,VideoContent content,ReasonCode reasonCode,long timestamp){ String sessionId=SessionIdGenerator.getNewId(); mRichCallLog.addVideoSharing(sessionId,contact,Direction.INCOMING,content,VideoSharing.State.REJECTED,reasonCode,timestamp); mBroadcaster.broa...
Add and broadcast video sharing invitation rejections
public MJournal reverseCorrectIt(int GL_JournalBatch_ID){ log.info(toString()); MJournal reverse=new MJournal(this); reverse.setGL_JournalBatch_ID(GL_JournalBatch_ID); reverse.setDateDoc(getDateDoc()); reverse.setC_Period_ID(getC_Period_ID()); reverse.setDateAcct(getDateAcct()); reverse.addDescription("(-...
Reverse Correction. As if nothing happened - same date
private void initLocation(){ MCountry country=m_location.getCountry(); log.fine(country.getName() + ", Region=" + country.isHasRegion()+ " "+ country.getCaptureSequence()+ ", C_Location_ID="+ m_location.getC_Location_ID()); if (country.getC_Country_ID() != s_oldCountry_ID) { fRegion.removeAllItems(); if (...
Dynamic Init & fill fields - Called when Country changes!
public synchronized void onGlobalCounterChanged(int value){ globalCounter.change(value); if (!isAppVisible.get()) { globalTempCounter.change(value); } }
Notify from Modules about global counters changed
@NotNull private Collection<PyPresenterTestMemberEntry> launchAndGetMembers(@NotNull final String classUnderRefactoring,@NotNull final String destinationClass){ final PyPullUpPresenterImpl sut=configureByClass(classUnderRefactoring); EasyMock.expect(myView.getSelectedParent()).andReturn(getClassByName(destinationCl...
Launches presenter and returns members it displayed to user
public static String toString(final byte[] input,final String encoding) throws IOException { return new String(input,Charsets.toCharset(encoding)); }
Get the contents of a <code>byte[]</code> as a String using the specified character encoding. <p> Character encoding names can be found at <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
public void initTuner(boolean controlI2C) throws UsbException { writeDemodRegister(mDeviceHandle,Page.ONE,(short)0xB1,(short)0x1A,1); writeDemodRegister(mDeviceHandle,Page.ZERO,(short)0x08,(short)0x4D,1); setIFFrequency(R820T_IF_FREQUENCY); writeDemodRegister(mDeviceHandle,Page.ONE,(short)0x15,(short)0x01,1); ...
Initializes the tuner section.
public FrInterruptRequest(int interruptNumber,boolean NMI,int icr){ this.interruptNumber=interruptNumber; isNMI=NMI; this.icr=icr; }
Create an Interrupt Request
protected boolean storeSecretKey(Context context,String keystoreAlias,SecretKey secretKey){ SharedPreferences.Editor editor=getSharedPreferences(context).edit(); if (secretKey == null) { editor.remove(getSharedPreferenceKey(keystoreAlias)); editor.apply(); return true; } else { try { byte[]...
Use the SecretKeyWrapper secure storage to write the key in a securely wrapped format
public int costInline(int thresh,Environment env,Context ctx){ if (implementation != null) return implementation.costInline(thresh,env,ctx); if (ctx == null) { return 3 + ((right == null) ? 0 : right.costInline(thresh,env,ctx)); } ClassDefinition ctxClass=ctx.field.getClassDefinition(); try { if (ct...
The cost of inlining this expression
public void testDetectLanguageHe(){ LOGGER.debug("detectLanguage he"); LanguageDetector instance=LanguageDetector.getInstance(); Document doc; try { doc=Jsoup.parse(new File(PATH + "he.wikipedia.org-wiki_20140701.html"),UTF_8); LOGGER.debug("start detection"); assertEquals("he",instance.detectLangua...
Test of detectLanguage method, of class LanguageDetector with he pages.
public static String urlEncodeArgs(Map<String,? extends Object> args){ return urlEncodeArgs(args,true); }
URL Encodes a Map of arguements
private IFolder createFolder(IFolder folderHandle,IProgressMonitor monitor) throws CoreException { folderHandle.create(false,true,monitor); if (monitor.isCanceled()) { throw new OperationCanceledException(); } return folderHandle; }
Creates a folder resource for the given folder handle.
public void handleException(ParseException ex,SIPMessage sipMessage,Class hdrClass,String header,String message) throws ParseException { if (sipStack.isLoggingEnabled()) sipStack.getStackLogger().logException(ex); if ((hdrClass != null) && (hdrClass.equals(From.class) || hdrClass.equals(To.class) || hdrClass.equa...
Exception processor for exceptions detected from the parser. (This is invoked by the parser when an error is detected).
@Override public void run(){ amIActive=true; String inputHeader=null; String outputHeader=null; int row, col; double z; double noData; int progress; int i; double minVal, maxVal; int numBins=1024; if (args.length <= 0) { showFeedback("Plugin parameters have not been set."); return; } i...
Used to execute this plugin tool.
protected CommandOutput receiveOutput(String shellId,String commandId) throws WinRMException { StrBuilder stdout=new StrBuilder(); StrBuilder stderr=new StrBuilder(); int exitCode=0; int sequenceId=0; boolean done=false; while (!done) { ReceiveData data=newReceiveOutput(shellId,commandId,sequenceId).exe...
Receives output from the remote shell command.
@SuppressWarnings("unchecked") public SimpleLexicon(short[] numSubStates,int smoothingCutoff,double[] smoothParam,Smoother smoother,double threshold,StateSetTreeList trainTrees){ this(numSubStates,threshold); init(trainTrees); }
Create a blank Lexicon object. Fill it by calling tallyStateSetTree for each training tree, then calling optimize().
public Object runSafely(Catbert.FastStack stack) throws Exception { if (stack.getUIMgrSafe() == null) return null; PseudoMenu currUI=stack.getUIMgrSafe().getCurrUI(); if (currUI != null) currUI.repaint(); return null; }
Redraws all UI elements on the current menu
public String toString(){ int old=data.position(); try { data.position(0); return data.asCharBuffer().toString(); } finally { data.position(old); } }
Return string representation of the array's contents.
public void writeEnum(final int fieldNumber,final int value) throws IOException { writeTag(fieldNumber,WireFormat.WIRETYPE_VARINT); writeEnumNoTag(value); }
Write an enum field, including tag, to the stream. Caller is responsible for converting the enum value to its numeric value.
public Bindings add(String property,JComboBox combo,int defaultValue){ combo.addActionListener(this); return add(new JComboBoxBinding(property,combo,defaultValue)); }
Handles JComboBox
public SuffixText(Composite parent,int style){ super(parent,style); this.setLayout(new SuffixLayout()); suffixText=createSuffixText(); editableText=new Text(this,SWT.NONE); configureListeners(); this.setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND)); this.setCursor(getDisplay().getSyst...
Create the suffix text.
Writer write(Writer writer,int indentFactor,int indent) throws JSONException { try { boolean commanate=false; final int length=this.length(); Iterator keys=this.keys(); writer.write('{'); if (length == 1) { Object key=keys.next(); writer.write(quote(key.toString())); writer.write...
Write the contents of the JSONObject as JSON text to a writer. For compactness, no whitespace is added. <p> Warning: This method assumes that the data structure is acyclical.
protected boolean[] instanceWeights(boolean nominalPredictor,boolean numericPredictor,boolean stringPredictor,boolean datePredictor,boolean relationalPredictor,boolean multiInstance){ print("clusterer uses instance weights"); printAttributeSummary(nominalPredictor,numericPredictor,stringPredictor,datePredictor,rela...
Checks whether the clusterer can handle instance weights. This test compares the clusterer performance on two datasets that are identical except for the training weights. If the results change, then the clusterer must be using the weights. It may be possible to get a false positive from this test if the weight changes ...
public void mutableMultiply(double c){ for ( KernelPoint kp : points) kp.mutableMultiply(c); }
Alters all the KernelPoint objects contained in this set by the same constant value
protected void paintComponent(Graphics g){ if (ui != null) { Graphics scratchGraphics=(g == null) ? null : g.create(); try { ui.update(scratchGraphics,this); } finally { scratchGraphics.dispose(); } } }
Calls the UI delegate's paint method, if the UI delegate is non-<code>null</code>. We pass the delegate a copy of the <code>Graphics</code> object to protect the rest of the paint code from irrevocable changes (for example, <code>Graphics.translate</code>). <p> If you override this in a subclass you should not make pe...
protected Object createElementInfo(){ return new JarPackageFragmentRootInfo(); }
Returns a new element info for this element.
public synchronized static boolean removeGlobalUnitConverter(UnitConverter unit){ return CONVERTERS.remove(unit); }
Removed the converter.
private void hideActionBarIfNeeded(){ ActionBar actionBar=getActionBar(); if (actionBar != null && !isHardwareKeyboardPresent() && mHideActionBarOnSoftKeyboardUp && mIsKeyboardOpen && actionBar.isShowing()) { getActionBar().hide(); } }
Hide the action bar if needed.
public static double sin(double a){ return 0.0d; }
Returns the trigonometric sine of an angle. Special cases: If the argument is NaN or an infinity, then the result is NaN. If the argument is positive zero, then the result is positive zero; if the argument is negative zero, then the result is negative zero.
public boolean isShowFlowgraphViews(){ return m_flowgraphViewsCheckbox.isSelected(); }
Returns whether flow graph views should be shown.
@Override public ModbusRequest readRequest(AbstractModbusListener listener) throws ModbusIOException { ModbusRequest req; try { byteInputStream.reset(); synchronized (byteInputStream) { byte[] buffer=byteInputStream.getBuffer(); if (!headless) { if (dataInputStream.read(buffer,0,6) == -1) { ...
readRequest -- Read a Modbus TCP encoded request. The packet has a 6 byte header containing the protocol, transaction ID and length.
public BackButtonBuilder<T> backButton(String text){ if (!(parent instanceof SubInlineMenuBuilder)) { throw new UnsupportedOperationException("Back buttons are only allowed for sub menus!"); } return new BackButtonBuilder<>(this,buttons().size(),text); }
Creates a new back button builder with provided text
public static void deinitialize(){ INSTANCE.codenameOneRunning=false; synchronized (lock) { lock.notifyAll(); } }
Closes down the EDT and Codename One, under normal conditions this method is completely unnecessary since exiting the application will shut down Codename One. However, if the application is minimized and the user wishes to free all resources without exiting the application then this method can be used. Once this method...
@Path(TriggerCommonParams.PATH_PROCESSES) public Process redirectToProcess(){ return new Process(); }
Redirects to trigger process endpoints
public DateMidnight withWeekyear(int weekyear){ return withMillis(getChronology().weekyear().set(getMillis(),weekyear)); }
Returns a copy of this date with the weekyear field updated. <p> The weekyear is the year that matches with the weekOfWeekyear field. In the standard ISO8601 week algorithm, the first week of the year is that in which at least 4 days are in the year. As a result of this definition, day 1 of the first week may be in the...
void paintComponent(Graphics g){ RectangularShape rectangle; int radius=RapidLookAndFeel.CORNER_DEFAULT_RADIUS; switch (position) { case SwingConstants.LEFT: rectangle=new RoundRectangle2D.Double(0,0,button.getWidth() + radius,button.getHeight(),radius,radius); break; case SwingConstants.CENTER: rectangle=new...
Draws the component background.
public void add(String key,String value){ String k=normalize(key); List<String> l=map.get(k); if (l == null) { l=new LinkedList<String>(); map.put(k,l); } l.add(value); }
adds the given value to the list of headers for the given key. If the mapping does not already exist, then it is created
public void startElement(String elementNamespaceURI,String elementLocalName,String elementName) throws SAXException { super.startElement(elementNamespaceURI,elementLocalName,elementName); }
From XSLTC
public List subList(int fromIndex,int toIndex){ throw new UnsupportedOperationException(); }
<b>Not supported</b> - Throws <tt>UnsupportedOperationException</tt> exception.
public PaintContext createContext(ColorModel cm,Rectangle deviceBounds,Rectangle2D userBounds,AffineTransform xform,RenderingHints hints){ if (patternTransform != null) { xform=new AffineTransform(xform); xform.concatenate(patternTransform); } if ((lastContext != null) && lastContext.getColorModel().equal...
Creates and returns a context used to generate the pattern.
public DefaultResourceLoader(ClassLoader classLoader){ this.classLoader=classLoader; }
Create a new DefaultResourceLoader.
@Override protected boolean showCriteriaParameter(){ return false; }
Returns false.
private boolean hasMatchingDo(){ Assert.isTrue(fToken == Symbols.TokenWHILE); nextToken(); switch (fToken) { case Symbols.TokenRBRACE: skipScope(); case Symbols.TokenSEMICOLON: skipToStatementStart(false,false); return fToken == Symbols.TokenDO; } return false; }
while(condition); is ambiguous when parsed backwardly, as it is a valid statement by its own, so we have to check whether there is a matching do. A <code>do</code> can either be separated from the while by a block, or by a single statement, which limits our search distance.
public void trim(final int ego){ this.alters[ego].trim(); }
Memory optimisation: shrinks storing arrays so that they do not contain unused slots.
public static void main(String... a) throws Exception { TestBase.createCaller().init().test(); }
Run just this test.
public void copyMeta(GridMetadataAwareAdapter from){ assert from != null; copyMeta(from.allMeta()); }
Copies all metadata from another instance.
public synchronized static LinkedHashMap<String,ArrayList<String>> predictAddressTags(Context context,final String elementType,final long elementOsmId,final ElementSearch es,final LinkedHashMap<String,ArrayList<String>> current,int maxRank){ Address newAddress=null; loadLastAddresses(context); if (lastAddresses !...
Predict address tags This uses a file to cache/save the address information over invocations of the TagEditor, if the cache doesn't have entries for a specific street/place an attempt to extract the information from the downloaded data is made
public static PlaceholderFragment newInstance(){ PlaceholderFragment fragment=new PlaceholderFragment(); Bundle args=new Bundle(); fragment.setArguments(args); return fragment; }
Returns a new instance of this fragment for the given section number.
public MTreeNode(int capacity,boolean isLeaf){ super(capacity,isLeaf,MTreeEntry.class); }
Creates a new MTreeNode with the specified parameters.
static char[][] translatedNames(char[][] names){ if (names == null) return null; int length=names.length; char[][] newNames=new char[length][]; for (int i=0; i < length; i++) { newNames[i]=translatedName(names[i]); } return newNames; }
Returns the Java Model representation of the given names which are provided in diet class file format, or <code>null</code> if the given names are <code>null</code>. <p><code>ClassFileReader</code> format is similar to "java/lang/Object", and corresponding Java Model format is "java.lang.Object".
public void cleanActivityList(List<Activity> list,QuadTree<ClusterPoint> qt){ if (list.size() > 1) { int index=1; while (index < list.size()) { Activity a=list.get(index - 1); Cluster ca=((List<ClusterPoint>)qt.getDisk(a.getLocation().getCoordinate().x,a.getLocation().getCoordinate().y,0)).get(0)....
This method merges all consecutive activities that share the same cluster, and then adjust the activity locations to that of the cluster to which it belongs, if the activity actually do belong to a cluster. Activities not belonging to any cluster will thus <i>not</i> be discarded.
public static long longEncode(long geohash,int level){ final short precision=(short)(geohash & 15); if (precision == level) { return geohash; } else if (precision > level) { return ((geohash >>> (((precision - level) * 5) + 4)) << 4) | level; } return ((geohash >>> 4) << (((level - precision) * 5) ...
Encode an existing geohash long to the provided precision
public double interpolate(Coord coord){ if (sg != null && coord != null) return interpolate(coord.getX(),coord.getY()); log.warn("Either the spatial grid is not initialized or the coordinates are zero!"); return Double.NaN; }
Interpolates the value at the given coordinate.
public UnchangeableAllowingOnBehalfActingException(Object[] params){ super(params); }
Constructs a new exception with the specified message parameters.
public MusicTrack(PlayMusicManager playMusicManager){ super(playMusicManager); }
Creates a data item
public static void updateQtyBatchs(Properties ctx,I_PP_Order order,boolean override){ BigDecimal qtyBatchSize=order.getQtyBatchSize(); if (qtyBatchSize.signum() == 0 || override) { int AD_Workflow_ID=order.getAD_Workflow_ID(); if (AD_Workflow_ID <= 0) return; MWorkflow wf=MWorkflow.get(ctx,AD_Workfl...
Set QtyBatchSize and QtyBatchs using Workflow and QtyEntered
@Pointcut("execution(* java.lang.Object.*(..))") public void objectMethod(){ }
Method execution pointcuts
public static final Bitmap createBlurredBitmap(final Bitmap sentBitmap){ if (sentBitmap == null) { return null; } final Bitmap mBitmap=sentBitmap.copy(sentBitmap.getConfig(),true); final int w=mBitmap.getWidth(); final int h=mBitmap.getHeight(); final int[] pix=new int[w * h]; mBitmap.getPixels(pix,0,...
Takes a bitmap and creates a new slightly blurry version of it.
public static void loadProject(final JTree tree,final INaviProject project){ Preconditions.checkNotNull(tree,"IE01435: Tree argument can not be null"); Preconditions.checkNotNull(project,"IE01436: Project argument can not be null"); loadProjectThreaded(SwingUtilities.getWindowAncestor(tree),project,tree); }
Loads a project while showing a progress dialog.
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.
private Data(){ }
This utility class cannot be instantiated
@Override public void cancel() throws SQLException { try { debugCodeCall("cancel"); checkClosed(); CommandInterface c=executingCommand; try { if (c != null) { c.cancel(); cancelled=true; } } finally { setExecutingStatement(null); } } catch ( Exception e)...
Cancels a currently running statement. This method must be called from within another thread than the execute method. Operations on large objects are not interrupted, only operations that process many rows.
private static int lowerBound(int from,final int to,final int pos,final IntComparator comp){ int len=to - from; while (len > 0) { int half=len / 2; int middle=from + half; if (comp.compare(middle,pos) < 0) { from=middle + 1; len-=half + 1; } else { len=half; } } return fro...
Performs a binary search on an already-sorted range: finds the first position where an element can be inserted without violating the ordering. Sorting is by a user-supplied comparison function.
public T link(String value){ return attr("link",value); }
Sets the <code>link</code> attribute on the last started tag that has not been closed.
public void init() throws ServletException { }
Initialization of the servlet. <br>
@Override protected EClass eStaticClass(){ return UmplePackage.eINSTANCE.getAnonymous_afterCode_2_(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public void write(long position,ByteBuf src,int srcStart,int srcLength) throws IOException { final int bufferPosition=checkOffset(position,srcLength); final long destAddress=PlatformDependent.directBufferAddress(lastMapped) + bufferPosition; if (src.hasMemoryAddress()) { final long srcAddress=src.memoryAddres...
Writes a sequence of bytes to this file from the given buffer. <p> <p> Bytes are written starting at this file's specified position,
public void requestUpdate(){ synchronized (updateLock) { updateOnce=true; } }
Asks Display2D to update itself next iteration regardless of the current redrawing/updating rule.
public final View findNextFocus(ViewGroup root,View focused,int direction){ return findNextFocus(root,focused,null,direction); }
Find the next view to take focus in root's descendants, starting from the view that currently is focused.
public void printUnit(JCCompilationUnit tree,JCClassDecl cdef) throws IOException { docComments=tree.docComments; printDocComment(tree); if (tree.pid != null) { print("package "); printExpr(tree.pid); print(";"); println(); } boolean firstImport=true; for (List<JCTree> l=tree.defs; l.nonEmpt...
Print unit consisting of package clause and import statements in toplevel, followed by class definition. if class definition == null, print all definitions in toplevel.
public static SpannableString typeface(Context context,int strResId,int style){ if (sDefaultTypefaceCollection == null) { throw new IllegalStateException("Default typeface collection not initialized. Forgot to call init()?"); } return typeface(context.getString(strResId),sDefaultTypefaceCollection,style); }
Return spannable string with typeface in certain style see: http://stackoverflow.com/questions/8607707/how-to-set-a-custom-font-in-the-actionbar-title
public static NodeSelection empty(){ return EMPTY; }
Creates a new instance representing the empty selection.
public static Io.Builder<GraphSONIo> build(){ return build(GraphSONVersion.V1_0); }
Create a new builder using the default version of GraphSON.
String[] createdAssumptions(){ Boolean sufficesSelected=useSufficesButton.getSelection(); Vector<String[]> vec=new Vector<String[]>(); int lastAddedAssump=state.assumeReps.size(); if (state.splitChosen()) { lastAddedAssump--; } for (int i=state.firstAddedAssumption; i < lastAddedAssump; i++) { NodeR...
Returns string array such that applying stringArrayToString to it produces the text of the list of assumptions in createdAssumps of the spec of MakeProof.
private static boolean isLdapRef(Object obj){ if (!(obj instanceof Reference)) { return false; } String thisClassName=LdapCtxFactory.class.getName(); Reference ref=(Reference)obj; return thisClassName.equals(ref.getFactoryClassName()); }
Returns true if argument is an LDAP reference.
private void initializeListeners(){ addMouseListener(m_listener); addMouseMotionListener(m_listener); addKeyListener(m_listener); addFocusListener(m_listener); m_caret.addCaretListener(m_listener); }
Initializes the listeners that handle keyboard and mouse input.
public int[] coefficients(){ IntArrayList coefficients=new IntArrayList(); for (int i=0, c; i < list.size(); i++) if ((c=(int)list.getLong(i)) != 0) coefficients.add(c); return coefficients.toIntArray(); }
Returns an array containing the coefficients in variable increasing order. <p>Mainly for debugging purposes.
@Override public void accept(double value){ ++count; simpleSum+=value; sumWithCompensation(value); min=Math.min(min,value); max=Math.max(max,value); }
Records another value into the summary information.
private void notifyRegisterChanged(){ for ( final IRegistersChangedListener listener : reglisteners) { listener.registerDataChanged(); } }
Notifies the register listeners about changes in the register values.
public void add(int v){ _add(numberNode(v)); }
Method for setting value of a field to specified numeric value.
public @Test final void testCreationNegative(){ thrown.expect(IllegalArgumentException.class); new Email(null,null); }
Test construction of Email entities.
public static void printHelp(){ Debug.output(""); Debug.output("usage: java com.bbn.openmap.image.ImageMaster [-file <properties file> || -url <properties file>] [-masterprops || -serverprops"); Debug.output(" -file requires a complete path to a ImageMaster properties file."); Debug.output(" -url requir...
<b>printHelp </b> should print a usage statement which reflects the command line needs of the ImageServer.
public static PolygonRDD SpatialRangeQuery(PolygonRDD polygonRDD,Envelope envelope,Integer condition){ JavaRDD<Polygon> result=polygonRDD.getRawPolygonRDD().filter(new PolygonRangeFilter(envelope,condition)); return new PolygonRDD(result); }
Spatial range query on top of PolygonRDD
public void add(String name,String value){ if (headerBuilder == null) { headerBuilder=new Headers.Builder(); } headerBuilder.add(name,value); }
We have already handled etag, and will add 'If-Match' & 'Range' value if it works.