Tabnine Logo
Instance.name
Code IndexAdd Tabnine to your IDE (free)

How to use
name
method
in
net.roboconf.core.model.beans.Instance

Best Java code snippets using net.roboconf.core.model.beans.Instance.name (Showing top 4 results out of 315)

origin: roboconf/roboconf-platform

private Collection<Instance> replicateInstancesFrom( Instance rootInstance ) {
  Collection<Instance> newRootInstances = new ArrayList<> ();
  // Begin with the duplicates of the deepest instances.
  List<Instance> orderedInstances = InstanceHelpers.buildHierarchicalList( rootInstance );
  Collections.reverse( orderedInstances );
  for( Instance instance : orderedInstances ) {
    String countAsString = instance.data.remove( INST_COUNT );
    Integer count = 1;
    try {
      count = Integer.parseInt( countAsString );
    } catch( NumberFormatException e ) {
      // ignore, the validator for the parsing model should handle this
    }
    if( count <= 1 )
      continue;
    String format = "%0" + String.valueOf( count ).length() + "d";
    for( int i=2; i<=count; i++ ) {
      Instance copy = InstanceHelpers.replicateInstance( instance );
      copy.name( copy.getName() + String.format( format, i ));
      if( instance.getParent() != null )
        InstanceHelpers.insertChild( instance.getParent(), copy );
      else
        newRootInstances.add( copy );
    }
    // Update the first one
    instance.name( instance.getName() + String.format( format, 1 ));
  }
  return newRootInstances;
}
origin: roboconf/roboconf-platform

copy.name( current.getName());
copy.component( current.getComponent());
copy.channels.addAll( current.channels );
origin: roboconf/roboconf-platform

@Test
public void testChain() {
  Instance inst = new Instance().name( "ins" ).status( InstanceStatus.DEPLOYING ).component( null ).parent( null );
  Assert.assertEquals( 0, inst.channels.size());
  Assert.assertEquals( "ins", inst.getName());
  Assert.assertEquals( InstanceStatus.DEPLOYING, inst.getStatus());
  Assert.assertNull( inst.getComponent());
  Assert.assertNull( inst.getParent());
  Assert.assertEquals( 1, inst.channel( "woo" ).channels.size());
  Assert.assertEquals( 2, inst.channel( "yeah" ).channels.size());
  Assert.assertEquals( 2, inst.channel( "woo" ).channels.size());
}
origin: roboconf/roboconf-platform

  @Test
  public void testCrap() {

    Instance inst = new Instance();
    Assert.assertNull( inst.toString());
    Assert.assertNotNull( inst.name( "azerty" ).toString());

    Component comp = new Component();
    Assert.assertNull( comp.toString());
    Assert.assertNotNull( comp.name( "azerty" ).toString());

    Application app = new Application( new ApplicationTemplate());
    Assert.assertNull( app.toString());
    Assert.assertNotNull( app.name( "azerty" ).toString());

    Assert.assertTrue( 0 < PreferenceKeyCategory.values().length );
  }
}
net.roboconf.core.model.beansInstancename

Javadoc

Sets the name in a chain approach.

Popular methods of Instance

  • getName
  • getComponent
  • getStatus
  • <init>
  • getImports
  • setStatus
  • component
  • getParent
  • getChildren
  • setName
  • setComponent
  • channel
    Adds a channel in a chain approach.
  • setComponent,
  • channel,
  • setParent,
  • status,
  • equals,
  • parent,
  • toString

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Permission (java.security)
    Legacy security code; do not use.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • JLabel (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now