code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public int size(){
return count;
}
| Returns the size of this table. |
public static ArgumentValue combine(ArgumentValue val1,ArgumentValue val2,Type actualArgumentType){
if (!val1.getType().equals(val2.getType())) {
return new TypeValue(actualArgumentType);
}
ArgumentValue ret;
if (val1.isConcreteList() && val2.isConcreteList()) {
ret=ConcreteListArgumentValue.combine((Co... | Combine arguments from different occurrences of the same method is an intelligent way. For example, any value combined with a concrete value will be an any value. |
public DockingCollar(int docks){
totalSpace=1;
currentSpace=1;
}
| Create a space for the given tonnage of troops. For this class, only the weight of the troops (and their equipment) are considered; if you'd like to think that they are stacked like lumber, be my guest. |
public boolean validSystemNameFormat(String systemName){
return (getBitFromSystemName(systemName) != 0);
}
| Public method to validate system name format returns 'true' if system name has a valid format, else returns 'false' |
public ConnectionConfig(jmri.jmrix.SerialPortAdapter p){
super(p);
}
| Ctor for an object being created during load process; Swing init is deferred. |
public FastByteBuffer append(byte[] array){
return append(array,0,array.length);
}
| Appends <code>byte</code> array to buffer. |
public DOMCryptoBinary(BigInteger bigNum){
if (bigNum == null) {
throw new NullPointerException("bigNum is null");
}
this.bigNum=bigNum;
value=Base64.encode(bigNum);
}
| Create a <code>DOMCryptoBinary</code> instance from the specified <code>BigInteger</code> |
public static void importExpressionTypes(final CConnection connection,final int rawModuleId,final int moduleId) throws SQLException {
final String query="INSERT INTO " + CTableNames.EXPRESSION_TYPES_TABLE + " SELECT "+ moduleId+ ", address, \"position\", \"offset\", expression_id, type"+ " FROM "+ String.format(CTabl... | Imports the expression type substitutions. |
@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:25.276 -0500",hash_original_method="5FE21C0D4C27ADA98D267B634214C4D7",hash_generated_method="E65D98A0F413DD17CCBE36D5733E81B4") public static void registerHandler(int type,ChunkHandler h... | Register an instance of the ChunkHandler class to handle a specific chunk type. Throws an exception if the type already has a handler registered. |
public static <T>CompletionStage<T> dereference(CompletionStage<? extends CompletionStage<T>> stage){
return stage.thenCompose(Function.identity());
}
| This takes a stage of a stage of a value and returns a plain stage of a value. |
protected void drawChipGrid(Graphics2D g2,Rectangle2D plotArea){
Shape savedClip=g2.getClip();
g2.setClip(getWaferEdge(plotArea));
Rectangle2D chip=new Rectangle2D.Double();
int xchips=35;
int ychips=20;
double space=1d;
if (this.dataset != null) {
xchips=this.dataset.getMaxChipX() + 2;
ychips=thi... | Calculates and draws the chip locations on the wafer. |
@Override public void eUnset(int featureID){
switch (featureID) {
case TypesPackage.TSETTER__FPAR:
setFpar((TFormalParameter)null);
return;
}
super.eUnset(featureID);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public Vector2 add(float x,float y){
this.x+=x;
this.y+=y;
return this;
}
| Adds the given components to this vector |
public IndicatorCollector(Indicator indicator,EpsilonBoxDominanceArchive archive){
this(indicator,archive,null);
}
| Constructs an unattached collector for recording performance indicator values from an algorithm, with an ε-box dominance archive to prune the approximation set to a desired resolution. |
public static String of(CtClass type){
StringBuffer sbuf=new StringBuffer();
toDescriptor(sbuf,type);
return sbuf.toString();
}
| Returns the descriptor representing the given type. |
private String make2UriKey(URI uri1,URI uri2){
String part1="null";
String part2="null";
if (uri1 != null) {
part1=uri1.toString();
}
if (uri2 != null) {
part2=uri2.toString();
}
return part1 + "+" + part2;
}
| Make a String key from two URIs. |
public boolean hasWhere(){
return super.hasElement(Where.KEY);
}
| Returns whether it has the office location. |
public Set<String> hkeys(final String key){
checkIsInMulti();
client.hkeys(key);
return BuilderFactory.STRING_SET.build(client.getBinaryMultiBulkReply());
}
| Return all the fields in a hash. <p> <b>Time complexity:</b> O(N), where N is the total number of entries |
public void normal(){
mHintView.setVisibility(View.VISIBLE);
mHintView.setText(R.string.pulltorefresh_listview_footer_hint_normal);
if (footerProgressBarEnabled) mProgressBar.setVisibility(View.GONE);
}
| normal status |
public void tasks(){
if (mSeekingDesired) {
seekPeers();
}
else {
stopSeekingPeers();
}
}
| The "main loop" for WifiDirectSpeaker. This method is called each time the RangzenService runs its backgroundTasks() method, which happens periodically over time. |
public static boolean isAllWhitespace(CharSequence self){
for (int i=0; i < self.length(); i++) {
if (!Character.isWhitespace(self.charAt(i))) return false;
}
return true;
}
| True if a CharSequence only contains whitespace characters. |
private static Map<Character,GrayscaleMatrix> createCharacterImages(final Font font,final Dimension characterSize,final char[] characters){
BufferedImage img=new BufferedImage(characterSize.width,characterSize.height,BufferedImage.TYPE_INT_ARGB);
Graphics g=img.getGraphics();
Graphics2D graphics=(Graphics2D)g;
... | Creates the character images. |
private static boolean checkPrefixIsIgnorable(final String str,int forwardIndex,int backwardIndex){
boolean trunk_prefix_was_read=false;
while (backwardIndex >= forwardIndex) {
if (tryGetISODigit(str.charAt(backwardIndex)) >= 0) {
if (trunk_prefix_was_read) {
return false;
}
else {
... | Return true if the prefix of "str" is "ignorable". Here, "ignorable" means that "str" has only one digit and separator characters. The one digit is assumed to be trunk prefix. |
protected void prepare(){
ProcessInfoParameter[] para=getParameter();
for (int i=0; i < para.length; i++) {
String name=para[i].getParameterName();
if (para[i].getParameter() == null) ;
else log.log(Level.SEVERE,"Unknown Parameter: " + name);
}
}
| Prepare - e.g., get Parameters. |
@Override public Object draw(Graphics2D g2,Rectangle2D area,Object params){
EntityBlockParams ebp;
StandardEntityCollection sec=null;
if (params instanceof EntityBlockParams) {
ebp=(EntityBlockParams)params;
if (ebp.getGenerateEntities()) {
sec=new StandardEntityCollection();
}
}
Rectangle2D... | Draws the block within the specified area. |
public T caseTimeEventSpec(TimeEventSpec object){
return null;
}
| Returns the result of interpreting the object as an instance of '<em>Time Event Spec</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> |
@Override public boolean eIsSet(int featureID){
switch (featureID) {
case UmplePackage.CONSTRAINT_TOKEN___CONSTRAINT_1:
return constraint_1 != null && !constraint_1.isEmpty();
}
return super.eIsSet(featureID);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
private void fillWorksheetListBox(String spreadsheetTitle){
String[] stringsForListbox=new String[worksheetEntries.size()];
for (int i=0; i < worksheetEntries.size(); i++) {
WorksheetEntry entry=worksheetEntries.get(i);
stringsForListbox[i]=entry.getTitle().getPlainText() + " (in " + spreadsheetTitle+ ")";
... | Fills up the list-box of worksheets with the already computed entries. |
public IterationAttachExample(){
oredCriteria=new ArrayList<Criteria>();
}
| This method was generated by MyBatis Generator. This method corresponds to the database table iteration_object |
public static void cutSchedule(TransitSchedule schedule,Coord center,double radius){
Set<Id<TransitStopFacility>> stopsInArea=new HashSet<>();
for ( TransitStopFacility stopFacility : schedule.getFacilities().values()) {
if (CoordUtils.calcEuclideanDistance(center,stopFacility.getCoord()) <= radius) {
st... | Cuts the schedule. All routes that pass stops within radius of center are kept |
public static Map<String,String> crackURL(final String cURL){
if (!cURL.startsWith("file") && !cURL.startsWith("http") && !cURL.startsWith("https")) {
return null;
}
final Map<String,String> propertiesMap=new HashMap<String,String>();
final int index1=cURL.indexOf("://");
propertiesMap.put("cScheme",cURL.... | Breaks a URL into its component parts. Javascript for Acrobat API Reference version 8.1 p716 |
public final JMenuItem addCheckboxItem(JMenu menu,String key,String label){
JCheckBoxMenuItem item=new JCheckBoxMenuItem(label);
menuItems.put(key,item);
item.setActionCommand(key);
menu.add(item);
item.addItemListener(itemListener);
return item;
}
| Adds a CheckboxMenuItem to a menu. |
protected void sequence_SourceFragment(ISerializationContext context,SourceFragment semanticObject){
genericSequencer.createSequence(context,semanticObject);
}
| Contexts: SourceFragment returns SourceFragment Constraint: (sourceFragmentType=SourceFragmentType paths+=STRING paths+=STRING*) |
public void remove(MessageListener listener){
this.listeners.remove(MessageListener.class,listener);
}
| removeMessageListener() - |
public AlgorithmInitializationException(Algorithm algorithm,String message,Throwable cause){
super(algorithm,message,cause);
}
| Constructs an algorithm initialization exception originating from the specified algorithm with the given message and cause. |
ITypeBinding resolveArrayType(ITypeBinding typeBinding,int dimensions){
return null;
}
| Answer an array type binding with the given type binding and the given dimensions. <p/> <p> If the given type binding is an array binding, then the resulting dimensions is the given dimensions plus the existing dimensions of the array binding. Otherwise the resulting dimensions is the given dimensions. </p> <p/> <p> Th... |
public void testBug12417() throws Exception {
if (serverSupportsStoredProcedures() && isServerRunningOnWindows()) {
createProcedure("testBug12417","()\nBEGIN\nSELECT 1;end\n");
Connection ucCatalogConn=null;
try {
ucCatalogConn=getConnectionWithProps((Properties)null);
ucCatalogConn.setCatalog... | Tests fix for Bug#12417 - stored procedure catalog name is case-sensitive on Windows (this is actually a server bug, but we have a workaround in place for it now). |
@DSSink({DSSinkKind.SYNCHRONIZATION_DATA}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:59:45.548 -0500",hash_original_method="AFDADB0B0E37C71FB8D4BE31CA39F990",hash_generated_method="B6827FF2C6A650BBE4692173D7372E8C") public Message sendMessageSynchronously(int what,int arg1,int... | Send the Message synchronously. |
public static int poisson(double lambda){
if (!(lambda > 0.0)) throw new IllegalArgumentException("Parameter lambda must be positive");
if (Double.isInfinite(lambda)) throw new IllegalArgumentException("Parameter lambda must not be infinite");
int k=0;
double p=1.0;
double expLambda=Math.exp(-lambda);
d... | Returns a random integer from a Poisson distribution with mean λ. |
public INode remove(){
throw new UnsupportedOperationException("remove() operation not supported by StateHash");
}
| Not supported since it makes no sense in this context. |
@Override public void onActivityResult(int requestCode,int resultCode,Intent data){
super.onActivityResult(requestCode,resultCode,data);
switch (requestCode) {
case REQUEST_AUTHORIZATION:
if (resultCode != Activity.RESULT_OK) {
chooseAccount();
}
break;
case REQUEST_ACCOUNT_PICKER:
if (resultCode == A... | Handles Google OAuth 2.0 authorization or account chosen result |
public void moveX(double dx){
setTranslateX(getTranslateX() - dx);
loadTiles();
}
| Move the center of the map horizontally by a number of pixels. After this operation, it will be checked if new tiles need to be downloaded |
@Interruptible public static void gc(){
Selected.Plan.handleUserCollectionRequest();
}
| External call to force a garbage collection. |
public static void mergeFiles(final File file1,final File file2,final File outputFile){
if (!isReadable(file1) || !isReadable(file2) || !outputFile.exists() && !makeDirsForFile(outputFile)) {
return;
}
try {
FileInputStream fis1=new FileInputStream(file1);
FileInputStream fis2=new FileInputStream(file... | Merge two files into a new file |
public static boolean runAsJar(){
return Core.class.getResource("Core.class").toString().startsWith("jar");
}
| determines whether or not Grassmarlin is running from an IDE or JAR file |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
@Override public String goldAnswer(){
return getString(GOLDANSWER_KEY);
}
| convenience method for getting gold answer |
public static String cutToIndexOf(String string,String substring){
int i=string.indexOf(substring);
if (i != -1) {
string=string.substring(0,i);
}
return string;
}
| Cuts the string from beginning to the first index of provided substring. |
public static void cleanupFilesOnFailure(Directory dir,List<String> files){
for ( String file : files) {
IOUtils.deleteFilesIgnoringExceptions(dir,file);
}
}
| Cleanup the index directory by deleting all given files. Called when file copy or sync failed. |
public void commit(Object source) throws Exception {
if (commit != null) {
commit.call(context,source);
}
}
| This method is used to invoke the provided objects commit function during the deserialization process. The commit function must be marked with the <code>Commit</code> annotation so that when the object is deserialized the persister has a chance to invoke the function so that the object can build further data structures... |
public void add(Term[] terms,int position){
if (termArrays.size() == 0) field=terms[0].field();
for (int i=0; i < terms.length; i++) {
if (terms[i].field() != field) {
throw new IllegalArgumentException("All phrase terms must be in the same field (" + field + "): "+ terms[i]);
}
}
termArrays.add... | Allows to specify the relative position of terms within the phrase. |
void cleanup(){
}
| Ops-mode programming doesn't put the command station in programming mode, so we don't have to send an exit-programming command at end. Therefore, this routine does nothing except to replace the parent routine that does something. |
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. |
public void initCqListeners(CqListener[] cqListeners){
if (cqListeners == null || cqListeners.length == 0) {
this.cqAttributes.setCqListeners(null);
}
else {
List nl=Arrays.asList(cqListeners);
if (nl.contains(null)) {
throw new IllegalArgumentException(LocalizedStrings.CqAttributesFactory_INITCQ... | Removes all Cq listeners and then adds each listener in the specified array. |
protected void clearImages(){
for ( Widget widget : currentOverlays) {
RootPanel.get().remove(widget);
}
currentOverlays.clear();
}
| Clear all images that may be displayed now |
public void testMng5568(){
String a="6.1.0";
String b="6.1.0rc3";
String c="6.1H.5-beta";
checkVersionsOrder(b,a);
checkVersionsOrder(b,c);
checkVersionsOrder(a,c);
}
| Test <a href="https://issues.apache.org/jira/browse/MNG-5568">MNG-5568</a> edge case which was showing transitive inconsistency: since A > B and B > C then we should have A > C otherwise sorting a list of ComparableVersions() will in some cases throw runtime exception; see Netbeans issues <a href="https://netbeans.org/... |
public void updateUI(){
setUI((ButtonUI)UIManager.getUI(this));
}
| Resets the UI property to a value from the current look and feel. |
protected boolean isPossibleToDequeueOneToOneFileTransfer(ContactId contact,Uri file,long size){
Capabilities remoteCapabilities=mContactManager.getContactCapabilities(contact);
if (remoteCapabilities == null) {
if (mLogger.isActivated()) {
mLogger.debug(new StringBuilder("Cannot dequeue one-to-one file t... | Check if it is possible to dequeue one-one file transfer |
public void render(){
render(0);
}
| Render non-stereo video |
public XmlHandler overrideAnnotatedClass(){
try {
for ( Class<?> clazz : FilesManager.annotatedClasses()) overrideAnnotatedClass(clazz,true);
}
catch ( Exception e) {
JmapperLog.ERROR(e);
}
return this;
}
| This method rewrites the xml configuration of only those classes configured in annotation and xml. |
public <T>T fromXML(final String xml) throws ClassNotFoundException, ObjectStreamException {
try {
return fromXML(new StringReader(xml));
}
catch ( final ObjectStreamException e) {
throw e;
}
catch ( final IOException e) {
throw new StreamException("Unexpected IO error from a StringReader",e);
}
... | Deserialize a self-contained XStream with object from a String. The method will use internally an XppDriver to load the contained XStream instance with default permissions. |
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. |
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
s.defaultReadObject();
if (node1 == null) {
throw new NullPointerException();
}
if (node2 == null) {
throw new NullPointerException();
}
if (endpoint1 == null) {
throw new NullPointerException();
}
if (... | Adds semantic checks to the default deserialization method. This method must have the standard signature for a readObject method, and the body of the method must begin with "s.defaultReadObject();". Other than that, any semantic checks can be specified and do not need to stay the same from version to version. A readObj... |
private int normaliseYear(int year){
if (year < 70) {
return year + 2000;
}
else if (year < 100) {
return year + 1900;
}
else {
return year;
}
}
| If the year is written in 2 digit format, then add the required number of years to get an absolute year. We assume that the date range is 1970 onwards. |
public RecoveryRequestBuilder(ElasticsearchClient client,RecoveryAction action){
super(client,action,new RecoveryRequest());
}
| Constructs a new recovery information request builder. |
private List<Node<T>> mergeDividersVerticallyWithPeripheralMove(SurfacePriviledged<T> surface,Node<T> node){
List<Node<T>> affectedNodes=new ArrayList<Node<T>>();
double dividerAllowance=surface.getDividerSize() * 2;
double mergeLoc=node.r.getMaxY() - Math.rint(node.r.height / 2);
List<Divider<T>> prevSearchRes... | Merges two bordering horizontal dividers moving any other horizontal dividers which may lie between the two dividers proportionally out of the way. |
@SuppressWarnings("unchecked") @Override public void eSet(int featureID,Object newValue){
switch (featureID) {
case UmplePackage.INLINE_STATE_MACHINE___QUEUED_1:
setQueued_1((Boolean)newValue);
return;
case UmplePackage.INLINE_STATE_MACHINE___NAME_1:
setName_1((String)newValue);
return;
case UmplePackage.INLINE_S... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public InputStream openNextChunkAsStream() throws IOException {
closeBinaryStream(true);
if (isStreamEnded()) return null;
return binaryStream=new ChunkInputStream(in);
}
| Create a stream for reading the next chunk of data. |
@Override protected String defaultClassifierString(){
return "weka.classifiers.trees.DecisionStump";
}
| String describing default classifier. |
private boolean readBuffer() throws IOException {
if (_readBuffer == null || _source == null) {
_readOffset=0;
_readLength=0;
return false;
}
int readLength=_source.read(_readBuffer,0,_readBuffer.length);
_readOffset=0;
if (readLength > 0) {
_readLength=readLength;
_position+=readLength;
... | Fills the read buffer, flushing the write buffer. |
public static void close(){
if (!systemStream) {
out.close();
}
}
| Closes the stream. |
protected void openButton(){
if (locoBox.getSelectedRosterEntries().length != 0) {
RosterEntry re=locoBox.getSelectedRosterEntries()[0];
startProgrammer(null,re,(String)programmerBox.getSelectedItem());
}
else {
JOptionPane.showMessageDialog(this,Bundle.getMessage("LocoMustSelected"),Bundle.getMessage(... | handle pushing the open programmer button by finding names, then calling a template method |
public synchronized int indexOf(File file){
if (file == null) return -1;
for (int i=0; i < value.length; i++) {
try {
if ((FileUtils.getCanonicalFile(value[i])).equals(FileUtils.getCanonicalFile(file))) return i;
}
catch ( IOException ioe) {
continue;
}
}
return -1;
}
| Returns the index of the given file in this array, -1 if file is not found. |
public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
doGet(request,response);
}
| The doPost method of the servlet. <br> This method is called when a form has its tag value method equals to post. |
public void addAttribute(String name,String value){
}
| From XSLTC |
public Vertex discover(boolean details,boolean fork,String filter,Vertex vertex,Vertex vertex2,Vertex vertex3,Vertex vertex4,Vertex vertex5){
String keywords=vertex.getDataValue();
String keywordscaps=Utils.capitalize(vertex.getDataValue());
if ((vertex2 != null) && !vertex2.is(Primitive.NULL)) {
keywords=key... | Discover the meaning of the word. Called from Self. |
public static boolean isNetworkAvailable(Context context){
ConnectivityManager cm=(ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo netInfo=cm.getActiveNetworkInfo();
return netInfo != null && netInfo.isConnectedOrConnecting();
}
| check availability of Internet |
@TargetApi(Build.VERSION_CODES.FROYO) public final BottomSheet maximize(){
bottomSheet.maximize();
return bottomSheet;
}
| Creates a bottom sheet with the arguments, which have been supplied to the builder and immediately maximizes it. |
public void copy(PImage src,int sx,int sy,int sw,int sh,int dx,int dy,int dw,int dh){
g.copy(src,sx,sy,sw,sh,dx,dy,dw,dh);
}
| Copies area of one image into another PImage object. |
public void schedule(TimerTask task,long delay,long period){
if (delay < 0 || period <= 0) {
throw new IllegalArgumentException();
}
scheduleImpl(task,delay,period,false);
}
| Schedule a task for repeated fixed-delay execution after a specific delay. |
private List<UsageLicense> doRevokeUserFromSubscriptionInt(Subscription subscription,List<PlatformUser> users) throws TechnicalServiceNotAliveException, TechnicalServiceOperationException {
List<UsageLicense> licenseList=new ArrayList<>();
for ( PlatformUser user : users) {
UsageLicense license=subscription.re... | Worker method for revokeUserFromSubscription, allows to ignore lastUser-Check (only for use in unsubscribe) |
public RemoveAction(@Nullable JComponent target,String id){
super(target,id);
}
| Creates a new instance which acts on the specified component. |
public void fireFocus(Component c){
if (listeners == null || listeners.size() == 0) {
return;
}
boolean isEdt=Display.getInstance().isEdt();
if (isEdt && listeners.size() == 1) {
FocusListener a=(FocusListener)listeners.get(0);
if (c.hasFocus()) {
a.focusGained(c);
}
else {
a.focusL... | Fires the event safely on the EDT without risk of concurrency errors |
public void done() throws IOException {
tagWriter.completeTag();
}
| SWFActions interface |
public boolean isCompacted(){
return compacted;
}
| Method that checks if the element has been compacted. |
public void testAuthenticateSpringOpenLdapCorrect(){
LdapManager mgr=getLdapOpenLdap();
LdapAuthenticationUserNameVO authenticationInfo=new LdapAuthenticationUserNameVO();
authenticationInfo.setUserName("ngomila");
authenticationInfo.setUserCredentials("ldap");
String ret=null;
try {
ret=mgr.authenticat... | Test de autenticacion de Open Ldap con contrasenia correcta |
public FieldType(FieldType ref){
this.stored=ref.stored();
this.tokenized=ref.tokenized();
this.storeTermVectors=ref.storeTermVectors();
this.storeTermVectorOffsets=ref.storeTermVectorOffsets();
this.storeTermVectorPositions=ref.storeTermVectorPositions();
this.storeTermVectorPayloads=ref.storeTermVectorPay... | Create a new mutable FieldType with all of the properties from <code>ref</code> |
public static void addBody(Message message,String body){
XHTMLExtension xhtmlExtension=(XHTMLExtension)message.getExtension("html",namespace);
if (xhtmlExtension == null) {
xhtmlExtension=new XHTMLExtension();
message.addExtension(xhtmlExtension);
}
xhtmlExtension.addBody(body);
}
| Adds an XHTML body to the message. |
public void enableErrorMessageCollection(boolean pNewState){
mMessageCollectionEnabled=pNewState;
if (mMessages == null && mMessageCollectionEnabled) {
mMessages=new ArrayList<String>();
}
}
| Switches error message collection on or of. <p/> The standard destination for parser error messages is <code>System.err</code>. However, if <code>true</code> gets passed to this method this default behaviour will be switched off and all error messages will be collected instead of written to anywhere. <p/> The default v... |
protected TypeDefiningElementImpl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
private void loadSlotContent(final Player player,final RPSlot slot,final PlayerSlot newSlot){
final List<RPObject> objects=new LinkedList<RPObject>();
for ( final RPObject objectInSlot : slot) {
objects.add(objectInSlot);
}
slot.clear();
player.removeSlot(slot.getName());
player.addSlot(newSlot);
Ite... | Loads the items into the slots of the player on login. |
@Override public IMatrix matrixValue(final IScope scope,final IType contentsType,final ILocation preferredSize,final boolean copy) throws GamaRuntimeException {
return listValue(scope,contentsType,false).matrixValue(scope,contentsType,preferredSize,false);
}
| Method matrixValue() |
public GeneralException(final String msg){
super(msg);
}
| Instantiates a new RCS exception. |
public void release(int number){
int[] loc=locate(number);
assigned[loc[0]]&=~(1 << loc[1]);
}
| Recycle or release a number. |
private static int decodeGroup(char[] data,byte[] array,int position) throws CoderException {
int b1, b2, b3, b4;
try {
b1=REVERSE.get(data[0]);
b2=REVERSE.get(data[1]);
b3=REVERSE.get(data[2]);
b4=REVERSE.get(data[3]);
}
catch ( NullPointerException e) {
throw new CoderException("Illegal ch... | Decode four chars from data into 0-3 bytes of data starting at position in array. |
public static <T>T orElse(T primary,@NonNull T other){
return primary != null ? primary : other;
}
| Return primary if it is non-null. If primary is null, return other. |
@Override protected EClass eStaticClass(){
return UmplePackage.eINSTANCE.getAnonymous_parameter_1_();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@Override public String toString(){
return getClass().getSimpleName();
}
| Returns a simple string representation of the object. |
public boolean matches(String className){
return pattern.matcher(className).matches();
}
| returns true, if the given class (binary name, dotted) matches this rule. |
@Override public String toString(){
return getName();
}
| Returns a string representation of the object. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.