code
stringlengths
10
174k
nl
stringlengths
3
129k
public static JSONObject createOpenGraphObjectForPost(String type,String title,String imageUrl,String url,String description,JSONObject objectProperties,String id){ JSONObject openGraphObject=new JSONObject(); try { if (type != null) { openGraphObject.put("type",type); } openGraphObject.put("title...
Creates a JSONObject for an open graph object that is suitable for posting.
public void accept(IResourceVisitor visitor) throws CoreException { for (int i=0, imax=resources.length; i < imax; i++) try { if (resources[i].exists()) resources[i].accept(visitor,depth,flags); } catch ( CoreException e) { if (e.getStatus().getCode() != IResourceStatus.RESOURCE_NOT_FOUND) throw...
Visits all existing resources defined by this traversal.
private void test(String problem) throws Exception { jmetal.core.Problem problemA; Problem problemB; if (problem.equals("ZDT1")) { problemA=new jmetal.problems.ZDT.ZDT1("Real"); problemB=new org.moeaframework.problem.ZDT.ZDT1(); } else if (problem.equals("ZDT2")) { problemA=new jmetal.problems.ZD...
Tests the specified problem by comparing the results against the JMetal implementation.
public Enumeration<K> keys(){ return new KeyIterator(); }
Returns an enumeration of the keys in this table.
public String toString(){ StringBuilder sb=new StringBuilder(); sb.append("================== MaterialPackage ======================\n"); sb.append(this.header.toString()); sb.append(String.format("instance_uid = 0x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%n",this.instance_uid[0],this.ins...
A method that returns a string representation of a MaterialPackageBO object
public boolean sameAs(CacheServer other){ return getPort() == other.getPort() && eq(getBindAddress(),other.getBindAddress()) && getSocketBufferSize() == other.getSocketBufferSize() && getMaximumTimeBetweenPings() == other.getMaximumTimeBetweenPings() && getNotifyBySubscription() == other.getNotifyBySubscription() && ...
Returns whether or not this bridge server has the same configuration as another bridge server.
static NdefRecord[] parse(ByteBuffer buffer,boolean ignoreMbMe) throws FormatException { List<NdefRecord> records=new ArrayList<NdefRecord>(); try { byte[] type=null; byte[] id=null; byte[] payload=null; ArrayList<byte[]> chunks=new ArrayList<byte[]>(); boolean inChunk=false; short chunkTnf=...
Main record parsing method.<p> Expects NdefMessage to begin immediately, allows trailing data.<p> Currently has strict validation of all fields as per NDEF 1.0 specification section 2.5. We will attempt to keep this as strict as possible to encourage well-formatted NDEF.<p> Always returns 1 or more NdefRecord's, or thr...
public static RealVector fftConvolution(RealVector first,RealVector second){ IncompatibleVectorsException.checkVectorsCompatible(first,second); DenseFloatMatrix1D coltVec1=new DenseFloatMatrix1D(first.getCoordinates()); DenseFloatMatrix1D coltVec2=new DenseFloatMatrix1D(second.getCoordinates()); int dimension=f...
Returns the circular convolution of the two input vectors. See Plate, Holographic Reduced Representations, Section 3.1
public CHelpSavePane(final String text,final IHelpInformation information){ super(text); m_information=information; }
Creates a new save text field object.
public void testCookies() throws Exception { startServer(47500); fetchPage("/cookies.jsp",200); fetchPage("/cookies.jsp?cookie=yes",200); }
Tests whether the client can remember cookies.
public void startPreserving() throws org.xml.sax.SAXException { m_preserves.push(true); m_ispreserve=true; }
Starts a whitespace preserving section. All characters printed within a preserving section are printed without indentation and without consolidating multiple spaces. This is equivalent to the <tt>xml:space=&quot;preserve&quot;</tt> attribute. Only XML and HTML serializers need to support this method. <p> The contents o...
public void execute(){ if (this.parent == null) { LOG.error("Can not execute command, parent is null"); throw new RuntimeException("Can not execute command, parent is null"); } if (this.parent.getDbId() == null) { LOG.error("Can not execute command, dbid of parent is null"); throw new RuntimeExcep...
Executes this command. Loads accessory links of <code>CnATreeElement parent</code> by calling dao method retrieve.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:34:26.745 -0500",hash_original_method="967A1FFF1D78A377DCB1552FAD26240E",hash_generated_method="B387EDD658B0C0EA1C4E8CB091822B2C") public RadialGradient(float x,float y,float radius,int color0,int color1,TileMode tile){ if (radius <=...
Create a shader that draws a radial gradient given the center and radius.
public OMRect(double lt1,double ln1,double lt2,double ln2,int lType,int nsegs){ super(RENDERTYPE_LATLON,lType,DECLUTTERTYPE_NONE); lat1=lt1; lon1=ln1; lat2=lt2; lon2=ln2; this.nsegs=nsegs; }
Create a lat/lon rectangle.
@SuppressWarnings("unused") public void reload(){ serviceLoader.reload(); storageServiceProviders.clear(); load(); }
Reload storage providers
public static float[] convertSampleRate(float[] samples,int numFrames,int numChannels,int sampleRate,int targetSampleRate){ assert samples.length >= numFrames * numChannels; assert numChannels > 0; assert sampleRate > 0; assert targetSampleRate > 0; float[] buffer; if (sampleRate == targetSampleRate) { ...
Convert the sample rate of a multi channel PCM signal.
public void copyBackupSet(File sourceDir,File destDir) throws IOException { log.debug("copying backup set from: {} to: {}",sourceDir,destDir); log.info("Saving copy of operations files to: {}",destDir); if (!sourceDir.exists()) { throw new IOException("Backup Set source directory: " + sourceDir.getAbsolutePat...
Copies a complete set of Operations files from one directory to another directory. Usually used to copy to or from a backup location. Creates the destination directory if it does not exist. Only copies files that are included in the list of Operations files.
@SuppressWarnings("unchecked") @Override public void eSet(int featureID,Object newValue){ switch (featureID) { case EipPackage.INVOCABLE_ENDPOINT__NAME: setName((String)newValue); return; case EipPackage.INVOCABLE_ENDPOINT__TO_CHANNELS: getToChannels().clear(); getToChannels().addAll((Collection<? extends Channel...
<!-- begin-user-doc --> <!-- end-user-doc -->
public final void rotY(double angle){ double sinAngle, cosAngle; sinAngle=Math.sin(angle); cosAngle=Math.cos(angle); this.m00=cosAngle; this.m01=0.0; this.m02=sinAngle; this.m10=0.0; this.m11=1.0; this.m12=0.0; this.m20=-sinAngle; this.m21=0.0; this.m22=cosAngle; }
Sets the value of this matrix to a counter clockwise rotation about the y axis.
public void removeMAddr(){ if (uriParms != null) uriParms.delete(MADDR); }
Remove the maddr param if it exists.
@Deprecated public TermsQueryBuilder disableCoord(boolean disableCoord){ this.disableCoord=disableCoord; return this; }
Disables <tt>Similarity#coord(int,int)</tt> in scoring. Defaults to <tt>false</tt>.
private static double polySine(final double x){ double x2=x * x; double p=2.7553817452272217E-6; p=p * x2 + -1.9841269659586505E-4; p=p * x2 + 0.008333333333329196; p=p * x2 + -0.16666666666666666; p=p * x2 * x; return p; }
Computes sin(x) - x, where |x| < 1/16. Use a Remez polynomial approximation.
public void compileProjects(List<File> projects) throws N4JSCompileException { compileProjects(Arrays.asList(new File(".")),projects,Collections.emptyList(),new DismissingIssueAcceptor()); }
Compile a list of projects.
public void add(SchemaObject obj){ if (SysProperties.CHECK && obj.getSchema() != this) { DbException.throwInternalError("wrong schema"); } String name=obj.getName(); HashMap<String,SchemaObject> map=getMap(obj.getType()); if (SysProperties.CHECK && map.get(name) != null) { DbException.throwInternalErr...
Add an object to this schema. This method must not be called within CreateSchemaObject; use Database.addSchemaObject() instead
public Type basicGetType(){ return type; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public void printStackTrace(PrintWriter output){ synchronized (output) { super.printStackTrace(output); Throwable throwable=getException(); if (throwable != null) { if (this.fileName != null) { output.print("Caused in "); output.print(this.fileName); output.print(" by: "); ...
Prints this exception's stack trace to the given print writer.
private int expungeStaleEntry(int staleSlot){ Entry[] tab=table; int len=tab.length; tab[staleSlot].value=null; tab[staleSlot]=null; size--; Entry e; int i; for (i=nextIndex(staleSlot,len); (e=tab[i]) != null; i=nextIndex(i,len)) { ThreadLocal<?> k=e.get(); if (k == null) { e.value=null; ...
Expunge a stale entry by rehashing any possibly colliding entries lying between staleSlot and the next null slot. This also expunges any other stale entries encountered before the trailing null. See Knuth, Section 6.4
public static void main(final String[] args){ DOMTestCase.doMain(nodecdatasectionnodename.class,args); }
Runs this test from the command line.
@Override public void addOFSwitchListener(IOFSwitchListener listener){ this.switchListeners.add(listener); }
ISwitchService Implementation
public void testFirstRead() throws Exception { File logDir=prepareLogDir("testFirstRead"); DiskLog log=openLog(logDir,false); log.setTimeoutMillis(500); LogConnection conn=log.connect(true); assertTrue("Found beginning",conn.seek(LogConnection.FIRST)); assertNull("Non-blocking read returns null",conn.next(f...
Confirm that if you seek to the beginning of a newly initialized log next() returns null if the connection is non-blocking and otherwise blocks and then times out. (Using a timeout enables us to test blocking without using extra threads.)
@Override public UpdateResponse optimize(boolean waitFlush,boolean waitSearcher,int maxSegments) throws SolrServerException, IOException { UpdateResponse ur=null; if (this.solr0 != null) ur=this.solr0.optimize(waitFlush,waitSearcher,maxSegments); if (this.solr1 != null) ur=this.solr1.optimize(waitFlush,waitSe...
Performs an explicit optimize, causing a merge of all segments to one. <p> Note: In most cases it is not required to do explicit optimize
public org.fife.ui.rsyntaxtextarea.Token yylex() throws java.io.IOException { int zzInput; int zzAction; int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL=zzEndRead; char[] zzBufferL=zzBuffer; char[] zzCMapL=ZZ_CMAP; int[] zzTransL=ZZ_TRANS; int[] zzRowMapL=ZZ_ROWMAP; int[] zzAttrL=ZZ_ATTRIBUTE; ...
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
public SQLDataException(String reason,String sqlState){ super(reason,sqlState,0); }
Creates an SQLDataException object. The Reason string is set to the given reason string, the SQLState string is set to the given SQLState string and the Error Code is set to 0.
public boolean isReserved(){ String prefix=getPrefix(); String name=getName(); if (prefix != null) { return prefix.startsWith(RESERVED); } return name.startsWith(RESERVED); }
This returns true if the attribute is reserved. An attribute is considered reserved if it begins with "xml" according to the namespaces in XML 1.0 specification. Such attributes are used for namespaces and other such details.
public void writeGTRModel(int num,XMLWriter writer,PartitionSubstitutionModel model){ String prefix=model.getPrefix(num); writer.writeComment("The general time reversible (GTR) substitution model"); writer.writeOpenTag(GTRParser.GTR_MODEL,new Attribute[]{new Attribute.Default<String>(XMLParser.ID,prefix + "gtr")}...
Write the GTR model XML block.
public double circumRadiusRatio(Vertex b,Vertex c){ Vertex x=this.circleCenter(b,c); double radius=distance(x,b); double edgeLength=distance(this,b); double el=distance(b,c); if (el < edgeLength) { edgeLength=el; } el=distance(c,this); if (el < edgeLength) { edgeLength=el; } return radius / ...
Computes the value of the ratio of the circumradius to shortest edge. If smaller than some given tolerance B, the associated triangle is considered skinny. For an equal lateral triangle this value is 0.57735. The ratio is related to the minimum triangle angle theta by: circumRadius/shortestEdge = 1/(2sin(theta)).
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 PasswordEncoder passwordEncoder(){ return new BCryptPasswordEncoder(); }
Method passwordEncoder return new BCrypt password encoder
public static MapBinder<String,Level> contributeLogLevels(Binder binder){ return MapBinder.newMapBinder(binder,String.class,Level.class,LogLevels.class); }
Provides a way to set default log levels for specific loggers. These settings can be overridden via Bootique configuration of whatever logging module you might use, like bootique-logback. This feature may be handy to suppress chatty third-party loggers, but still allow users to turn them on via configuration.
public ExtendedType(int nodetype,String namespace,String localName){ this.nodetype=nodetype; this.namespace=namespace; this.localName=localName; this.hash=nodetype + namespace.hashCode() + localName.hashCode(); }
Create an ExtendedType object from node type, namespace and local name. The hash code is calculated from the node type, namespace and local name.
public void testActivityTestCaseSetUpProperly(){ assertNotNull("activity should be launched successfully",getActivity()); }
Verifies that activity under test can be launched.
public void initChannel() throws CarbonDataWriterException { initFileCount(); if (this.isInProgressExtrequired) { this.fileName=MessageFormat.format(this.fileNameFormat,this.fileCount) + CarbonCommonConstants.FILE_INPROGRESS_STATUS; FileData fileData=new FileData(this.fileName,this.storeLocation); fileM...
This method will be used to initialize the channel
public void decrementActivity(){ if (trackActivity) { if (isPrimary) { activityStats.primaryActive.decrement(); } activityStats.allActive.decrement(); } }
decrement allActive and primaryActive (not this active as that is done every time)
public void remove(Status status){ status.getStatusType().getStatusHandler().remove(status,this); }
removes a status
private void onStateChange(Session.State state){ switch (state) { case OPEN: setState(State.CONNECTED); break; case UNSTABLE: setState(State.SUSPENDED); break; case EXPIRED: setState(State.SUSPENDED); recoveryStrategy.recover(this); break; case CLOSED: setState(State.CLOSED); break; default : break; } }
Handles a session state change.
void add(SetupWindow window){ add(window,window.getKey()); }
Adds the speficied window to the CardLayout based on its title.
private void initAggregateMap(){ Iterator<String> it=typeMap.keySet().iterator(); while (it.hasNext()) { AtomicReference<Number> ref=null; String attribute=it.next(); Class<?> classzz=typeMap.get(attribute); if (classzz == Long.TYPE) { ref=new AtomicReference<Number>(new Long(0L)); } else...
Initialize all counters to 0;
public static boolean isJavaScriptEnabled(HttpServletRequest request){ HttpSession session=request.getSession(); Boolean javaScriptEnabled=(Boolean)session.getAttribute("javaScriptEnabled"); if (javaScriptEnabled != null) { return javaScriptEnabled.booleanValue(); } return false; }
Returns true if the user has JavaScript enabled.
protected Float wrapValue(float k){ return new Float(k); }
Wraps a value
public CountSimComparisonKMLWriter(final List<CountSimComparison> countSimCompList,final Network network,final CoordinateTransformation coordTransform){ super(countSimCompList); this.network=network; this.counts=null; this.coordTransform=coordTransform; this.graphname="countsSimRealPerHour_"; }
Sets the data to the fields of this class. We either accept "network" or "counts" to localize the counting stations.
public BezierOutlineHandle(BezierFigure owner){ this(owner,false); }
Creates a new instance.
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:34:25.912 -0500",hash_original_method="5736B1A89F8587C3C51B72E5484012E7",hash_generated_method="B6FF23F3FBB84652AFC78CC30408C7FF") public boolean contains(float left,float top...
Returns true iff the 4 specified sides of a rectangle are inside or equal to this rectangle. i.e. is this rectangle a superset of the specified rectangle. An empty rectangle never contains another rectangle.
public void testTimedPoll() throws InterruptedException { LinkedBlockingQueue q=populatedQueue(SIZE); for (int i=0; i < SIZE; ++i) { assertEquals(i,q.poll(SHORT_DELAY_MS,MILLISECONDS)); } assertNull(q.poll(SHORT_DELAY_MS,MILLISECONDS)); }
timed poll with nonzero timeout succeeds when non-empty, else times out
@Override public int update(Uri uri,ContentValues values,String selection,String[] selectionArgs){ throw new UnsupportedOperationException("Not implemented"); }
This method is provided for use by the ContentResolver. Do not override, or directly call from your own code.
private byte[] readASCII(byte[] data,int start,int end){ byte[] o=new byte[(end - start) / 2]; int count=0; int bit=0; for (int loc=start; loc < end; loc++) { char c=(char)(data[loc] & 0xff); byte b=(byte)0; if (c >= '0' && c <= '9') { b=(byte)(c - '0'); } else if (c >= 'a' && c <= 'f...
Read data formatted as ASCII strings as binary data
public DebuggerTemplate createDebuggerTemplate(final String name,final String host,final int port) throws CouldntSaveDataException { try { final com.google.security.zynamics.binnavi.debug.debugger.DebuggerTemplate newTemplate=m_manager.createDebugger(name,host,port); return ObjectFinders.getObject(newTemplate...
Creates a new debugger template.
public static byte[] decodeWebSafe(byte[] source) throws Base64DecoderException { return decodeWebSafe(source,0,source.length); }
Decodes web safe Base64 content in byte array format and returns the decoded data. Web safe encoding uses '-' instead of '+', '_' instead of '/'
public MatFileReader(File file) throws IOException { this(file,new MatFileFilter()); }
Creates instance of <code>MatFileReader</code> and reads MAT-file from <code>file</code>. This method reads MAT-file without filtering.
static public void assertEquals(String message,int expected,int actual){ assertEquals(message,Integer.valueOf(expected),Integer.valueOf(actual)); }
Asserts that two ints are equal. If they are not an AssertionFailedError is thrown with the given message.
public Matrix4d normalize3x3(){ return normalize3x3(this); }
Normalize the upper left 3x3 submatrix of this matrix. <p> The resulting matrix will map unit vectors to unit vectors, though a pair of orthogonal input unit vectors need not be mapped to a pair of orthogonal output vectors if the original matrix was not orthogonal itself (i.e. had <i>skewing</i>).
public static void dump(String fileName,boolean details){ dump(fileName,new PrintWriter(System.out),details); }
Read the contents of the file and write them to system out.
private void processTuple(ArrayList<Integer> tempOsrMaps,LocalRegPair tuple,boolean isLast){ int first=(tuple.num << NUM_SHIFT) & NUM_MASK; if (!isLast) { first|=NEXT_BIT; } first|=(tuple.kind ? 1 : 0) << KIND_SHIFT; first|=(tuple.valueType << VTYPE_SHIFT); switch (tuple.typeCode) { case BooleanTypeCode: ...
Process a 32-bit tuple.
public void addOddChildCondition(){ _specificityC++; addCondition(Condition.createOddChildCondition()); }
the CSS condition that element has pseudo-class :odd
@Override public void delete(){ HumanResource.this.myAssignments.remove(this); HumanResource.this.fireAssignmentChanged(this); }
Removes all related assignments
public JFontChooser(Controller controller){ this.controller=controller; this.fontSizeStrings=DEFAULT_FONT_SIZE_STRINGS; defaultFont=FontSizer.INSTANCE.getAdjustedDefaultFont(); fontMetrics=getFontMetrics(defaultFont); int minimumWidth=fontMetrics.stringWidth(MultiBitFrame.EXAMPLE_LONG_FIELD_TEXT) + WIDTH_DELT...
Constructs a <code>JFontChooser</code> object.
void transform(){ glEnable(GL_RASTERIZER_DISCARD); glUseProgram(feedbackProgram); glUniformMatrix4fv(viewMatrixUniform,false,viewMatrix.get(matrixBuffer)); glUniformMatrix4fv(projectionMatrixUniform,false,projMatrix.get(matrixBuffer)); glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER,0,this.ssbo); glBeginTrans...
Transform the vertices and store them in a buffer object via transform feedback. <p> This method renders the sphere twice. Once a rotating sphere at the center. And another sphere orbiting the first sphere. <p> Actually, rendering two spheres with the same geometry should instead be accomplished by "instancing" in the ...
private boolean isViewHit(View view,int x,int y){ int[] viewLocation=new int[2]; view.getLocationOnScreen(viewLocation); int[] parentLocation=new int[2]; this.getLocationOnScreen(parentLocation); int screenX=parentLocation[0] + x; int screenY=parentLocation[1] + y; return screenX >= viewLocation[0] && scr...
Detect if the touch on the screen is at the region of the view.
public NavigationCommand(String command,int id){ super(command,id); }
Creates a new instance of NavigationCommand
public boolean handleMessage(Message m,Object o){ if (!super.handleMessage(m,o)) { if (m.getType().equals(MasterAgent.M_EVALUATE)) { ((MasterEvaluator)evaluator).receiveEvaluatorData((EvaluatorData)o); } else return false; } return true; }
Handles incoming messages.
@Override public void panRangeAxes(double percent,PlotRenderingInfo info,Point2D source){ if (!isRangePannable()) { return; } for ( ValueAxis axis : this.rangeAxes.values()) { if (axis == null) { continue; } double length=axis.getRange().getLength(); double adj=percent * length; if ...
Pans the range axes by the specified percentage.
public boolean hasNextState(){ return next != null; }
Is there a next state?
public static byte[] readData(final ClientReader inputStream) throws IOException { final int length=(int)readDWord(inputStream); readDWord(inputStream,DebugArgumentType.DATA.getValue()); return readBytes(inputStream,length); }
Reads a number of bytes from an input stream.
public OpacityManager(String prop,boolean inherit){ property=prop; inherited=inherit; }
Creates a new OpacityManager.
public static boolean isXMLNameCharacter(char c){ return (NAME_CHARACTER[c / 32] & (1 << (c % 32))) != 0; }
Tests whether the given character is a valid XML name character.
protected static long nextID(){ m_CurrentID++; return m_CurrentID; }
returns the next unique ID for a number generator
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:31:07.482 -0500",hash_original_method="2E7034A69395E1E5DBB2950602CE4F4E",hash_generated_method="5845989284F179105F977771244844BC") public Builder addIndexSetType(Primitive p){ Entry indexType=new Entry(); indexType.t=null; indexT...
Adds an index set primitive type to the builder object
public HttpRequest(String url){ this.m_url=url; m_connectTimeout=-1; m_readTimeout=-1; }
Create the request for the url.
public static Bitmap shrink(Bitmap bitmap,float scale){ if (scale >= 1.0f) { return bitmap.copy(bitmap.getConfig(),false); } Matrix matrix=new Matrix(); matrix.postScale(scale,scale); return Bitmap.createBitmap(bitmap,0,0,(int)(scale * bitmap.getWidth()),(int)(scale * bitmap.getHeight()),matrix,true); }
Shrink the bitmap to the specified scale.
public boolean isDisplayBoundingPoints(){ return mDisplayBoundingPoints; }
Returns if the bounding points of the first and last visible ones should be displayed.
private String convertLessThanOneThousand(int number){ String soFar; if (number % 100 < 20) { soFar=numNames[number % 100]; number/=100; } else { soFar=numNames[number % 10]; number/=10; String s=Integer.toString(number); if (s.endsWith("2") && !soFar.equals("")) soFar=" VINT-I-" + so...
Convert Less Than One Thousand
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
public Builder query(String... query){ this.query=query; return this; }
Sets the specified query.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:53.869 -0400",hash_original_method="3A8CB74DE4DC3CEA9C672A9C00607FF1",hash_generated_method="7AD30FF30CDD6B8CEAD94B576867F0ED") public static IOFileFilter suffixFileFilter(String suffix){ return new SuffixFileFilter(suffix); }
Returns a filter that returns true if the filename ends with the specified text.
public ManagerLogWriter(int level,PrintStream out){ this(level,out,null); }
Creates a writer that logs to <code>System.out</code>.
public List<String> mainHeader(){ return mainHeader; }
Get main header displayed at top of config.
public boolean resolveInAnnotation(){ if (fInAnnotationRequested) return fInAnnotation; fInAnnotationRequested=true; resolveSelectedNodes(); ASTNode node=getStartNode(); while (node != null) { if (node instanceof Annotation) { fInAnnotation=true; break; } node=node.getParent(); } ...
Resolves the selected nodes and returns <code>true</code> if the node or any of its ancestors is of type <code>Annotation</code>, <code>false</code> otherwise.
public void requestUpdateFromLayout(){ }
Request an update on status. <P> Since status is continually being updated, this isn't active now. Eventually, we may want to have this move the related AIU to the top of the polling queue.
public boolean hasLongitude(){ return mHasLongitude; }
Returns true if a longitude has been assigned to this Address, false otherwise.
public void handleDocumentEvent(DocumentEvent e){ if (running && parsers.size() > 0) { timer.restart(); } }
Called when the document is modified.
boolean hasRegisteredNode(UUID nodeId,IgniteUuid ldrId){ assert nodeId != null; assert ldrId != null; IgniteUuid ldrId0; synchronized (mux) { ldrId0=nodeLdrMap.get(nodeId); } return ldrId0 != null && ldrId0.equals(ldrId); }
Checks if node is participating in deployment.
public int read(byte[] b,int off,int len) throws IOException { if (b == null) { throw new NullPointerException(); } if ((off < 0) || (len < 0) || (off + len > b.length)) { throw new IndexOutOfBoundsException(); } if (len == 0) { return 0; } long pos=readUntil(pointer + len); len=(int)Math.mi...
Reads up to <code>len</code> bytes of data from the input stream into an array of bytes. An attempt is made to read as many as <code>len</code> bytes, but a smaller number may be read, possibly zero. The number of bytes actually read is returned as an integer. <p> This method blocks until input data is available, end ...
@Override public String toString(){ if (eIsProxy()) return super.toString(); StringBuffer result=new StringBuffer(super.toString()); result.append(" (importURI: "); result.append(importURI); result.append(')'); return result.toString(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
private void neverChangeLabel(T label,VisualNode node){ label.setText(text); label.setIcon(icon); }
Sets a never changing text and icon, used for root node.
public void addChild(Component child){ components.add(child); child.setParent(this); }
Adds a child to this composite at the end of the list.
public boolean hasAttendeeType(){ return super.hasElement(AttendeeType.KEY); }
Returns whether it has the event attendee type.
private int pop(){ if (outputStackTop > 0) { return outputStack[--outputStackTop]; } else { return STACK | -(--owner.inputStackTop); } }
Pops a type from the output frame stack and returns its value.
protected void checkChildType(Node n,boolean replace){ switch (n.getNodeType()) { case ELEMENT_NODE: case PROCESSING_INSTRUCTION_NODE: case COMMENT_NODE: case TEXT_NODE: case CDATA_SECTION_NODE: case ENTITY_REFERENCE_NODE: case DOCUMENT_FRAGMENT_NODE: break; default : throw createDOMException(DOMException.HIERARC...
Checks the validity of a node to be inserted.
public static DataWrapper serializableInstance(){ return new DataWrapper(new Parameters()); }
Generates a simple exemplar of this class to test serialization.
public void sort(Comparator<Individual> comparator){ Collections.sort(individuals,comparator); }
Sorts the individuals in ascending order according to their performance, thus the best one will be in last position.
public Result beforeCharTyped(char c,final Project project,final Editor editor,final PsiFile file,final FileType fileType){ return Result.CONTINUE; }
Called before the specified character typed by the user is inserted in the editor.