code
stringlengths
10
174k
nl
stringlengths
3
129k
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:51.186 -0400",hash_original_method="A9166391D9A7ACF8C30AB68B073CEF60",hash_generated_method="EAF7FED493196D746F3C93A3E19B3B66") public static void write(File file,CharSequence data,boolean append) throws IOException { write(file,d...
Writes a CharSequence to a file creating the file if it does not exist using the default encoding for the VM.
public CarrierVehicleTypes buildAndWriteVehicleTypes(String vehicleTypeFile,boolean totalCost){ double factor=0.1; double[] fixCostPerKm; if (totalCost) { fixCostPerKm=new double[]{4.1998 * factor,5.1704 * factor,6.5067 * factor,7.4026 * factor,8.2904 * factor}; } else { fixCostPerKm=new double[]{0,0,0...
This method builds vehicle types and writes a file containing the vehicle types. Five vehicle types are created with costs relating to the vehicle cost schedule of the RFA.
protected void reset(){ for ( List<? extends Position> boundary : this.boundaries) { if (boundary == null || boundary.size() < 3) continue; if (WWMath.computeWindingOrderOfLocations(boundary) != AVKey.COUNTER_CLOCKWISE) Collections.reverse(boundary); } this.numPositions=this.countPositions(); t...
Void any computed data. Called when a factor affecting the computed data is changed.
public Property centuryOfEra(){ return new Property(this,getChronology().centuryOfEra()); }
Get the century of era property.
public JClassDependency(String className,String digest){ _className=className; String newDigest=getDigest(); if (!newDigest.equals(digest)) { if (log.isLoggable(Level.FINE)) log.fine(_className + " digest is modified."); _isDigestModified=true; } }
Create a new dependency with a given digest.
public PBEWithMD5AndDESCipher() throws NoSuchAlgorithmException, NoSuchPaddingException { core=new PBES1Core("DES"); }
Creates an instance of this cipher, and initializes its mode (CBC) and padding (PKCS5).
public static String toString(Object object,ToStringStyle style,boolean outputTransients){ return toString(object,style,outputTransients,false,null); }
<p> Builds a <code>toString</code> value through reflection. </p> <p> It uses <code>AccessibleObject.setAccessible</code> to gain access to private fields. This means that it will throw a security exception if run under a security manager, if the permissions are not set up correctly. It is also not as efficient as test...
public void paintSliderBorder(SynthContext context,Graphics g,int x,int y,int w,int h,int orientation){ paintSliderBorder(context,g,x,y,w,h); }
Paints the border of a slider. This implementation invokes the method of the same name without the orientation.
public static void main(String[] args) throws IOException { boolean enableOutput=true; boolean outputToFile=false; String inputFolder=LrrMmt.class.getClassLoader().getResource("workload/planetlab").getPath(); String outputFolder="output"; String workload="20110303"; String vmAllocationPolicy="lrr"; String...
The main method.
public static void main(final String[] args){ DOMTestCase.doMain(getAttributeNS01.class,args); }
Runs this test from the command line.
public int compareToIgnoreCase(CharSeq another){ return str.compareToIgnoreCase(another.str); }
Compares two CharSeqs lexicographically ignore case differences.
public LIMIT LIMIT(String limit){ return new LIMIT(this,limit); }
Adds a SQL LIMIT clause
protected AbstractMetadataRegexAnnotator(String regex,int matcherGroup,boolean caseSensitive,String key,int valueGroup){ super(regex,matcherGroup,caseSensitive,1.0); this.key=key; this.valueGroup=valueGroup; }
New instance.
synchronized boolean isSuspendedInTransaction(CompositeTransaction ct){ return state.isSuspendedInTransaction(ct); }
Checks if this branch is suspended in the given transaction.
public static _ConstantRecordSearchFactor fromString(final String value) throws SOAPSerializationException { return (_ConstantRecordSearchFactor)Enumeration.fromString(value,_ConstantRecordSearchFactor.VALUES_TO_INSTANCES); }
Gets the specific enumeration value in this class appropriate for the given XML attribute value. If no value is known, null is returned (_DEFAULT is not used; that value is for when the attribute is not present).
private void addFinally(ArrayList returnList,Stmnt finallyBlock) throws CompileError { Bytecode bc=bytecode; int n=returnList.size(); for (int i=0; i < n; ++i) { final int[] ret=(int[])returnList.get(i); int pc=ret[0]; bc.write16bit(pc,bc.currentPc() - pc + 1); ReturnHook hook=new JsrHook2(this,re...
Adds a finally clause for earch return statement.
public X509CRLImpl(InputStream in) throws CRLException { try { this.crl=(CertificateList)CertificateList.ASN1.decode(in); this.tbsCertList=crl.getTbsCertList(); this.extensions=tbsCertList.getCrlExtensions(); } catch ( IOException e) { throw new CRLException(e); } }
Creates X.509 CRL on the base of ASN.1 DER encoded form of the CRL (CertificateList structure described in RFC 3280) provided via input stream.
public PingResponse isReachable(HostAddress host) throws HostException { PingResponse response=new PingResponse(); response.setReachable(false); for ( String name : this.getEnabledMethodNames()) { PingNotification notification=_isReachableByMethod(name,host); response.addNotification(notification); r...
Returns true if the host is reachable by an available ping method. This method clears previous notifications.
public void lockAndSwitchMaster(Protocol newMasterProtocol) throws ReconnectDuringTransactionException { if (masterProtocol != null && !masterProtocol.isClosed()) { masterProtocol.close(); } if (!currentReadOnlyAsked || isSecondaryHostFail()) { try { syncConnection(currentProtocol,newMasterProtocol)...
Use the parameter newMasterProtocol as new current master connection.
public void testBaseUriResolutionWithHashes() throws Exception { document=builder.parse(new InputSource(new StringReader("<a xml:base=\"http://a1/a2\">" + " <b xml:base=\"b1#b2\"/>" + " <c xml:base=\"#c1\">"+ " <d xml:base=\"\"/>"+ " </c>"+ " <e xml:base=\"\"/>"+ "</a>"))); Element a=document.getDocumentElem...
According to the <a href="http://www.w3.org/TR/xmlbase/">XML Base</a> spec, fragments (like "#frag" or "") should not be dereferenced.
public void extendTo(long newMax){ if (newMax < mCurrentLength) { throw new IllegalArgumentException("" + newMax + " is less than current length of: "+ mCurrentLength); } while (mTotalSize < newMax) { final long i=mTotalSize >>> mBits; if (i >= mData.length) { final long newSize=(mData.length + ...
Ensure there is enough space to store at least given number of entries. Internally there may be room for more.
public InstructionGraphEdge(final InstructionGraphNode source,final InstructionGraphNode target,final EdgeType edgeType){ super(source,target); this.edgeType=Preconditions.checkNotNull(edgeType,"Error: edgeType argument can not be null"); }
Creates a new instruction graph edge.
public static String toPoints(Point2D.Double[] points) throws IOException { StringBuilder buf=new StringBuilder(); for (int i=0; i < points.length; i++) { if (i != 0) { buf.append(", "); } buf.append(toNumber(points[i].x)); buf.append(','); buf.append(toNumber(points[i].y)); } return b...
Returns a Point2D.Double array as a Points attribute value. as specified in http://www.w3.org/TR/SVGMobile12/shapes.html#PointsBNF
@XmlElement(name="licensed_ind") public boolean isLicensed(){ return licensed; }
Flag which indicates if the application contains a license file..whether expired or not.
protected void frameInit(){ super.frameInit(); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); Container c=getContentPane(); if (c instanceof JPanel) { JPanel panel=(JPanel)c; panel.getActionMap().put(CDialog.ACTION_DISPOSE,CDialog.s_dialogAction); panel.getInputMap(JPanel.WHEN_IN_FOCUSED_WINDOW)...
Frame Init. Install ALT-Pause
public static Object withInputStream(File file,@ClosureParams(value=SimpleType.class,options="java.io.InputStream") Closure closure) throws IOException { return IOGroovyMethods.withStream(newInputStream(file),closure); }
Create a new InputStream for this file and passes it into the closure. This method ensures the stream is closed after the closure returns.
public AttachmentNoSoapResponse(){ requestFileName="getstate.query"; responseFile="attachm-no-soap.query"; responseContentType="multipart/related; charset=UTF-8; " + "boundary=jetty771207119h3h10dty"; }
Constructs the test case.
public static char[] toCharArray(InputStream is,Charset encoding) throws IOException { CharArrayWriter output=new CharArrayWriter(); copy(is,output,encoding); return output.toCharArray(); }
Get the contents of an <code>InputStream</code> as a character array using the specified character encoding. <p> This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>.
public void handleEvent(Event evt){ Node node=(Node)evt.getTarget(); while (node != null && !(node instanceof SVGOMElement)) { node=(Node)((AbstractNode)node).getParentNodeEventTarget(); } BridgeUpdateHandler h=getBridgeUpdateHandler(node); if (h != null) { try { h.handleDOMCharacterDataModified...
Handles 'DOMCharacterDataModified' event type.
static Annotation parseAnnotation(ByteBuffer buf,ConstantPool constPool,Class<?> container,boolean exceptionOnMissingAnnotationClass){ return parseAnnotation2(buf,constPool,container,exceptionOnMissingAnnotationClass,null); }
Parses the annotation at the current position in the specified byte buffer, resolving constant references in the specified constant pool. The cursor of the byte buffer must point to an "annotation structure" as described in the RuntimeVisibleAnnotations_attribute: annotation { u2 type_index; u2 num_member_value_...
public boolean isValidInspector(){ return validInspector; }
Returns true if the inspector is valid. By default this returns false.
private void drawItems(Canvas canvas){ canvas.save(); int top=(currentItem - firstItem) * getItemHeight() + (getItemHeight() - getHeight()) / 2; canvas.translate(PADDING,-top + scrollingOffset); itemsLayout.draw(canvas); canvas.restore(); }
Draws items
public Attribute removeAttribute(String name){ for (int i=_attributes.size() - 1; i >= 0; i--) { Attribute attr=_attributes.get(i); if (attr.getName().equals(name)) { _attributes.remove(i); return attr; } } return null; }
Removes an attribute.
public void initDiskCache(){ synchronized (mDiskCacheLock) { if (mDiskLruCache == null || mDiskLruCache.isClosed()) { File diskCacheDir=mCacheParams.diskCacheDir; if (mCacheParams.diskCacheEnabled && diskCacheDir != null) { if (!diskCacheDir.exists()) { diskCacheDir.mkdirs(); }...
Initializes the disk cache. Note that this includes disk access so this should not be executed on the main/UI thread. By default an ImageCache does not initialize the disk cache when it is created, instead you should call initDiskCache() to initialize it on a background thread.
boolean isLaunchable(){ return false; }
Determines if this line is launchable.
public GossipSeed(InetSocketAddress endpoint,String hostHeader){ this.endpoint=endpoint; this.hostHeader=hostHeader; }
Creates a new instance with the specified endpoint and host header.
@Override public List<Action> search(Problem problem,Queue<Node> frontier){ explored.clear(); frontierStates.clear(); return super.search(problem,frontier); }
Clears the set of explored states and calls the search implementation of <code>QueSearch</code>
public FastCharBuffer append(FastCharBuffer buff){ if (buff.size == 0) { return this; } for (int i=0; i < buff.currentBufferIndex; i++) { append(buff.buffers[i]); } append(buff.currentBuffer,0,buff.offset); return this; }
Appends another fast buffer to this one.
public static boolean isXML11Space(int c){ return (c < 0x10000 && (XML11CHARS[c] & MASK_XML11_SPACE) != 0); }
Returns true if the specified character is a space character as amdended in the XML 1.1 specification.
@Override public GridNioFuture<Boolean> onSessionClose(GridNioSession ses) throws IgniteCheckedException { return tail.onSessionClose(ses); }
Starts chain notification from tail to head.
public boolean isMessageIdRequired(){ return false; }
Returns whether or not this message needs to include a message ID.
@Override public boolean nextBoolean(){ return next(1) != 0; }
This method is missing from jdk 1.0.x and below. JDK 1.1 includes this for us, but what the heck.
public void storeDeviceThrottled(Device d){ long intervalNs=syncStoreWriteIntervalMs * 1000L * 1000L; if (!isMaster) return; if (d == null) return; long now=System.nanoTime(); Long last=lastWriteTimes.get(d.getDeviceKey()); if (last == null || now - last > intervalNs) { writeUpdatedDeviceToStorage(d...
Write the given device to storage if we are MASTER and if the last write for the device was more than this.syncStoreIntervalNs time ago. Use this method to updated last active times in the store.
protected ClientHttpRequest createHttpRequest(final Link link){ final ClientHttpRequest request=new ClientHttpRequest(link); request.addHeaderValues(HttpHeader.USER_AGENT.getName(),USER_AGENT_HTTP_REQUEST_HEADER_VALUE); request.getHeaders().setAccept(getAcceptableMediaTypes()); if (this.securityProperties != nu...
Creates an instance of a client HTTP request with the specified Link targeting the resource as well as the intended operation on the resource.
private void processCommonFilterStatus(final TargetUpdateStatus status,final boolean buttonPressed){ if (buttonPressed) { buttonClicked.addStyleName(BTN_CLICKED); managementUIState.getTargetTableFilters().getClickedStatusTargetTags().add(status); eventBus.publish(this,TargetFilterEvent.FILTER_BY_STATUS); ...
Process - COMMON PROCESS.
private void writeObject(ObjectOutputStream out) throws ClassNotFoundException, IOException { out.defaultWriteObject(); out.writeObject(SerializationUtils.wrap(borderStroke)); }
Custom serialization method.
protected void paintPlaceholderText(SeaGlassContext context,Graphics g,JComponent c){ g.setColor(placeholderColor); g.setFont(c.getFont()); Rectangle innerArea=SwingUtilities.calculateInnerArea(c,null); Rectangle cancelBounds=getCancelButtonBounds(); context.getStyle().getGraphicsUtils(context).paintText(cont...
DOCUMENT ME!
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:12.848 -0500",hash_original_method="08919BACEEB275448156EA2ACF7B3D6A",hash_generated_method="43830782CE56377739CB711511AC20E1") public boolean inUse(){ synchronized (messageQueue) { return messageQueue.size() != 0; } }
Return true if there are any messages in use.
public void initialize(GL10 gl){ mState=STATE_INITIALIZED; int[] textures=new int[1]; gl.glGenTextures(1,textures,0); mTextureID=textures[0]; gl.glBindTexture(GL10.GL_TEXTURE_2D,mTextureID); gl.glTexParameterf(GL10.GL_TEXTURE_2D,GL10.GL_TEXTURE_MIN_FILTER,GL10.GL_NEAREST); gl.glTexParameterf(GL10.GL_TEXTU...
Call to initialize the class. Call whenever the surface has been created.
public ByteVector putLong(final long l){ int length=this.length; if (length + 8 > data.length) { enlarge(8); } byte[] data=this.data; int i=(int)(l >>> 32); data[length++]=(byte)(i >>> 24); data[length++]=(byte)(i >>> 16); data[length++]=(byte)(i >>> 8); data[length++]=(byte)i; i=(int)l; data[...
Puts a long into this byte vector. The byte vector is automatically enlarged if necessary.
private int[] shift(int[] array,int val){ array[0]=array[1]; array[1]=array[2]; array[2]=array[3]; array[3]=array[4]; array[4]=val; return array; }
Shift array 16 bits and add val to index.length - 1.
public static boolean isCacheSafe(Class<?> clazz,ClassLoader classLoader){ Assert.notNull(clazz,"Class must not be null"); try { ClassLoader target=clazz.getClassLoader(); if (target == null) { return true; } ClassLoader cur=classLoader; if (cur == target) { return true; } wh...
Check whether the given class is cache-safe in the given context, i.e. whether it is loaded by the given ClassLoader or a parent of it.
public byte decode16BitsTo8Bits(int s){ return (byte)((s >> 8) & 0xffff); }
Returns an unsigned 8 bit value computed by dithering the unsigned 16 bit value. Note that the TIFF specified short datatype is an unsigned value, while Java's <code>short</code> datatype is a signed value. Therefore the Java <code>short</code> datatype cannot be used to store the TIFF specified short value. A Java <co...
private static int blend_difference(int a,int b){ int f=(b & ALPHA_MASK) >>> 24; int ar=(a & RED_MASK) >> 16; int ag=(a & GREEN_MASK) >> 8; int ab=(a & BLUE_MASK); int br=(b & RED_MASK) >> 16; int bg=(b & GREEN_MASK) >> 8; int bb=(b & BLUE_MASK); int cr=(ar > br) ? (ar - br) : (br - ar); int cg=(ag > ...
returns the absolute value of the difference of the input colors C = |A - B|
public static Object instantiateObject(String className,PackageType packageType,Object... arguments) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException { return instantiateObject(packageType.getClass(className),argu...
Returns an instance of a desired class with the given arguments
public static byte[] twoBytePacket(int address,boolean longAddr,byte arg1,byte arg2){ if (!addressCheck(address,longAddr)) { return null; } byte[] retVal; if (longAddr) { retVal=new byte[5]; retVal[0]=(byte)(192 + ((address / 256) & 0x3F)); retVal[1]=(byte)(address & 0xFF); retVal[2]=arg1; ...
Create a packet containing a two-byte instruction.
private void fillArguments(DLangRunDmdConfiguration config){ Module module=comboModules.getSelectedModule(); if (module == null) { return; } try { java.util.List<String> args=DLangDmdConfigToArgsConverter.getDmdParameters(config,module); textArgsPane.setText(StringUtils.join(args,"\n")); } catch ...
Update "textArgsPane" text area with actual DMD command line arguments
public void removeObserver(final T observer){ observers.remove(observer); }
Remove one observer
public void testRandomStrings() throws Exception { Analyzer analyzer=new GalicianAnalyzer(); checkRandomData(random(),analyzer,1000 * RANDOM_MULTIPLIER); analyzer.close(); }
blast some random strings through the analyzer
private void marshallPrimitive(Object value,PrimitiveType primitiveType) throws XMLStreamException { LOG.debug("Primitive value: {} of type: {}",value,primitiveType); if (value != null) { xmlWriter.writeCharacters(value.toString()); } }
Marshall a primitive value.
protected UDPMasterTerminal(InetAddress addr){ address=addr; }
Create a UDP master connection to the specified Internet address.
public HashDocSet(int[] docs,int offset,int len){ this(docs,offset,len,DEFAULT_INVERSE_LOAD_FACTOR); }
Create a HashDocSet from a list of *unique* ids
public static double sum(double[] array){ double sum=0; for ( double x : array) { sum+=x; } return sum; }
Sum all numbers from array.
public NodeTest(int whatToShow,String namespace,String name){ initNodeTest(whatToShow,namespace,name); }
Construct an NodeTest that tests for namespaces and node names.
public ActivityChooserView(Context context,AttributeSet attrs){ this(context,attrs,0); }
Create a new instance.
public Builder badge(int value){ badge=value; return this; }
Sets the badge property.
private void showFeedback(String feedback){ if (myHost != null) { myHost.showFeedback(feedback); } else { System.out.println(feedback); } }
Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface.
public void buildTrapEntries(Hashtable<InetAddress,Vector<String>> dest){ if (children != null) { for (int i=0; i < children.length; ++i) { SimpleNode n=(SimpleNode)children[i]; if (n != null) { n.buildTrapEntries(dest); } } } }
Build the Trap entries from the syntactic tree.
public void reset(){ n_=0; combinedBufferItemCapacity_=Math.min(Util.MIN_BASE_BUF_SIZE,2 * k_); combinedBuffer_=new Object[combinedBufferItemCapacity_]; baseBufferCount_=0; bitPattern_=0; minValue_=null; maxValue_=null; }
Resets this sketch to a virgin state, but retains the original value of k.
public String printFeatures(){ int i; String s=""; for (i=0; i < m_decisionFeatures.length; i++) { if (i == 0) { s="" + (m_decisionFeatures[i] + 1); } else { s+="," + (m_decisionFeatures[i] + 1); } } return s; }
Returns a string description of the features selected
public void removeVisualizationListener(VisualizationListener listener){ vistree.removeVisualizationListener(listener); }
Add a listener.
public void testSqlCrossCacheQueryFailedMetrics() throws Exception { IgniteCache<String,Integer> cache=grid(0).context().cache().jcache("A"); SqlFieldsQuery qry=new SqlFieldsQuery("select * from \"G\".Integer"); testQueryFailedMetrics(cache,qry); }
Test metrics for failed SQL cross cache queries.
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
@Override public void updateStatus(JobContext jobContext) throws Exception { DbClient dbClient=jobContext.getDbClient(); try { if (_status == JobStatus.IN_PROGRESS) { return; } String opId=getTaskCompleter().getOpId(); StringBuilder logMsgBuilder=new StringBuilder(String.format("Updating statu...
Called to update the job status when the volumes delete job completes.
private static int LocationToLine(IDocument document,int location) throws BadLocationException { if (location == -1) { return -1; } else { return document.getLineOfOffset(location); } }
If location = -1, then it returns -1. Else it returns the number of the line with this location.
public byte[] bytes(){ return ref.bytes; }
Return a reference to the bytes of this builder.
public static String encodeXmlValue(String inString){ String retString=inString; retString=StringUtil.replaceString(retString,"&","&amp;"); retString=StringUtil.replaceString(retString,"<","&lt;"); retString=StringUtil.replaceString(retString,">","&gt;"); retString=StringUtil.replaceString(retString,"\"","&qu...
Encodes an XML string replacing the characters '<', '>', '"', ''', '&'
public int addTree(){ int total=value; if (left != null) total+=left.addTree(); if (right != null) total+=right.addTree(); return total; }
Add the value of this node with the cumulative values of the children of this node.
public boolean offer(PooledConnection pooledConnection){ acquiredConnections.remove(pooledConnection); boolean offer=queue.offer(pooledConnection); if (!offer) { pooledConnection.dispose(); } if (isTerminating.get()) { PooledConnection poll=queue.poll(); if (poll != null) { poll.dispose(); ...
Offer a connections back to the queue
public static boolean isEmpty(Object[] array){ return array == null || array.length == 0; }
Returns <code>true</code> if the given array is null or is empty.
public static void computeBestFittingControlPoints4(java.awt.geom.Point2D[] imagePoints,LatLon[] geoPoints,java.awt.geom.Point2D[] outImagePoints,LatLon[] outGeoPoints){ String message=validateControlPoints(4,imagePoints,geoPoints); if (message != null) { Logging.logger().severe(message); throw new IllegalA...
Computes which three control points out of four provide the best estimate an image's geographic location. The result is placed in the output parameters <code>outImagePoints</code> and <code>outGeoPoints</code>, both of which must be non-null and at least length 3.
public static boolean groupVerify(int userId,int groupId,OperationType operationType,int dstUserId){ if (isAdmin(userId)) { return true; } UserGroupMap userGroup=authBiz.getUserGroup(userId,groupId); Role userRoleType=Role.NOTEXIST; if (userGroup != null) { userRoleType=userGroup.getRole(); } bool...
user group related verify
public static void submit(String xml,Patient patient){ Element patientNode=XformBuilder.getElement(XformBuilder.getDocument(xml).getRootElement(),XformBuilder.NODE_PATIENT); if (patientNode == null) return; if (XformBuilder.getElement(patientNode,RelativeBuilder.NODE_RELATIVE) == null) { return; } Perso...
Saves relationships which have been edited, added, or deleted.
public static int EPROTONOSUPPORT(){ return Errno.EPROTONOSUPPORT.intValue(); }
Protocol not supported
public static Number minus(Number left,Number right){ return NumberMath.subtract(left,right); }
Subtraction of two Numbers.
public Element writeMatrix(Element parent,Object o,String name) throws Exception { weka.core.matrix.Matrix matrix; Element node; if (DEBUG) { trace(new Throwable(),name); } m_CurrentNode=parent; matrix=(weka.core.matrix.Matrix)o; node=addElement(parent,name,o.getClass().getName(),false); invokeWrite...
adds the given Matrix to a DOM structure.
@Override public boolean execute(final String[] params,final String remainder){ final RPAction action=new RPAction(); action.put("type","ignore"); if (params[0] == null) { action.put("list","1"); } else { action.put("target",params[0]); String duration=params[1]; if (duration != null) { i...
Execute an ignore command.
@Override public void run(){ amIActive=true; String inputFilesString=null; String fileName=null; String inputDataFile=null; String whiteboxHeaderFile=null; String whiteboxDataFile=null; WhiteboxRaster output=null; int i=0; int row, col, rows, cols; String[] imageFiles; int numImages=0; double no...
Used to execute this plugin tool.
public StyledToolTipUI(Style style){ this.style=style; border=BorderFactory.createLineBorder(style.getShadowColor()); }
Create a new StyledToolTipUI.
public DrawerBuilder withRecyclerView(@NonNull RecyclerView recyclerView){ this.mRecyclerView=recyclerView; return this; }
Define a custom RecyclerView which will be used in the drawer NOTE: this is not recommended
public ExtZipEntry(ExtZipEntry entry){ super(entry.getName()); setCompressedSize(entry.getCompressedSize()); setSize(entry.getSize()); setComment(entry.getComment()); setTime(entry.getTime()); setMethod(entry.getMethod()); }
copy all "non-compression" attributes
public synchronized void addTextListener(TextListener l){ if (l == null) { return; } textListener=AWTEventMulticaster.add(textListener,l); newEventsOnly=true; }
Adds the specified text event listener to receive text events from this text component. If <code>l</code> is <code>null</code>, no exception is thrown and no action is performed. <p>Refer to <a href="doc-files/AWTThreadIssues.html#ListenersThreads" >AWT Threading Issues</a> for details on AWT's threading model.
public static boolean hasImmediateRecursiveRuleRefs(GrammarAST t,String ruleName){ if (t == null) return false; GrammarAST blk=(GrammarAST)t.getFirstChildWithType(BLOCK); if (blk == null) return false; int n=blk.getChildren().size(); for (int i=0; i < n; i++) { GrammarAST alt=(GrammarAST)blk.getChildr...
Match (RULE RULE_REF (BLOCK (ALT .*) (ALT RULE_REF[self] .*) (ALT .*))) Match (RULE RULE_REF (BLOCK (ALT .*) (ALT (ASSIGN ID RULE_REF[self]) .*) (ALT .*)))
public void yypushback(int number){ if (number > yylength()) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos-=number; }
Pushes the specified amount of characters back into the input stream. They will be read again by then next call of the scanning method
public static SimpleModule makeModule(){ Version moduleVersion=new Version(1,0,0,null,null,null); SimpleModule module=new SimpleModule("LocalDate",moduleVersion); module.addSerializer(LocalDate.class,new JavaLocalDateSerializer()); module.addDeserializer(LocalDate.class,new JavaLocalDateDeserializer()); retur...
Create a module including the serializer and deserializer for local dates
private static void attemptRetryOnException(String logPrefix,Request<?> request,VolleyError exception) throws VolleyError { RetryPolicy retryPolicy=request.getRetryPolicy(); int oldTimeout=request.getTimeoutMs(); try { retryPolicy.retry(exception); } catch ( VolleyError e) { request.addMarker(String.f...
Attempts to prepare the request for a retry. If there are no more attempts remaining in the request's retry policy, a timeout exception is thrown.
public void removed(Container cont){ linkManager.resetLink(); }
Called when the layer is no longer part of the map. In this case, we should disconnect from the server if we have a link.
protected Size2D arrangeRR(BlockContainer container,Graphics2D g2,RectangleConstraint constraint){ Size2D s1=arrangeNN(container,g2); if (constraint.getHeightRange().contains(s1.height)) { return s1; } else { RectangleConstraint c=constraint.toFixedHeight(constraint.getHeightRange().getUpperBound()); ...
Arranges a container with range constraints for both the horizontal and vertical.
public long updateTtl(long elapsedTime){ this.ttl-=elapsedTime; this.currentAnimTimeMillis+=elapsedTime; if (this.currentAnimTimeMillis >= this.getUpdateTextureMillis() && this.animFrames > 0) { this.currentAnimTimeMillis=0; int pos=this.getTextPos(); pos++; if (pos < this.animFrames) { this...
Updates the Particle's TTL
private void renderAxes(Camera camera){ glPushMatrix(); glLoadIdentity(); float rotX=camera.getRotation().x; float rotY=camera.getRotation().y; float rotZ=0; glRotatef(rotX,1.0f,0.0f,0.0f); glRotatef(rotY,0.0f,1.0f,0.0f); glRotatef(rotZ,0.0f,0.0f,1.0f); glLineWidth(2.0f); glBegin(GL_LINES); glColo...
Renders the three axis in space (For debugging purposes only