Examples of Set


Examples of belotetime.application.game.Set

    g.addPlayer(g.getT1(), g.getPlayers().get(2));
    g.addPlayer(g.getT2(), g.getPlayers().get(3));
   
    g.getPacket().shuffle();
   
    g.setCurrentSet(new Set(g, g.getPlayers().get((int)(Math.random() * 4))));
    g.getCurrentSet().firstDeal(Set.THREE_CARDS);
  }
 
View Full Code Here

Examples of com.addthis.codec.Codec.Set

            boolean intern = false;
            Class<? extends Validator> validator = null;
            // extract annotations
            Annotation policy = field.getAnnotation(Set.class);
            if (policy != null) {
                Set setPolicy = (Set) policy;
                codable = setPolicy.codable();
                readonly = setPolicy.readonly();
                writeonly = setPolicy.writeonly();
                required = setPolicy.required();
                intern = setPolicy.intern();
                validator = setPolicy.validator();
                field.setAccessible(true);
                if (!codable) {
                    continue;
                }
            }
View Full Code Here

Examples of com.cumulocity.me.lang.Set

    protected Set getSet(JSONObject json, String propertyName, Class propertyElementType) {
        JSONArray jsonArray = json.optJSONArray(propertyName);
        if (jsonArray == null) {
            return null;
        }
        Set set = new HashSet();
        for (int i = 0; i < jsonArray.length(); i++) {
            set.add(conversionService.fromJson(jsonArray.getJSONObject(i), propertyElementType));
        }
        return set;
    }
View Full Code Here

Examples of com.github.sardine.model.Set

    HttpPropPatch entity = new HttpPropPatch(url);
    // Build WebDAV <code>PROPPATCH</code> entity.
    Propertyupdate body = new Propertyupdate();
    // Add properties
    {
      Set set = new Set();
      body.getRemoveOrSet().add(set);
      Prop prop = new Prop();
      // Returns a reference to the live list
      List<Element> any = prop.getAny();
      for (Map.Entry<QName, String> entry : setProps.entrySet())
      {
        Element element = SardineUtil.createElement(entry.getKey());
        element.setTextContent(entry.getValue());
        any.add(element);
      }
      set.setProp(prop);
    }
    // Remove properties
    {
      Remove remove = new Remove();
      body.getRemoveOrSet().add(remove);
View Full Code Here

Examples of com.google.api.services.youtube.YouTube.Thumbnails.Set

                    IMAGE_FILE_FORMAT, new BufferedInputStream(new FileInputStream(imageFile)));
            mediaContent.setLength(imageFile.length());

            // Create an API request that specifies that the mediaContent
            // object is the thumbnail of the specified video.
            Set thumbnailSet = youtube.thumbnails().set(videoId, mediaContent);

            // Set the upload type and add an event listener.
            MediaHttpUploader uploader = thumbnailSet.getMediaHttpUploader();

            // Indicate whether direct media upload is enabled. A value of
            // "True" indicates that direct media upload is enabled and that
            // the entire media content will be uploaded in a single request.
            // A value of "False," which is the default, indicates that the
            // request will use the resumable media upload protocol, which
            // supports the ability to resume an upload operation after a
            // network interruption or other transmission failure, saving
            // time and bandwidth in the event of network failures.
            uploader.setDirectUploadEnabled(false);

            // Set the upload state for the thumbnail image.
            MediaHttpUploaderProgressListener progressListener = new MediaHttpUploaderProgressListener() {
                @Override
                public void progressChanged(MediaHttpUploader uploader) throws IOException {
                    switch (uploader.getUploadState()) {
                        // This value is set before the initiation request is
                        // sent.
                        case INITIATION_STARTED:
                            System.out.println("Initiation Started");
                            break;
                        // This value is set after the initiation request
                        //  completes.
                        case INITIATION_COMPLETE:
                            System.out.println("Initiation Completed");
                            break;
                        // This value is set after a media file chunk is
                        // uploaded.
                        case MEDIA_IN_PROGRESS:
                            System.out.println("Upload in progress");
                            System.out.println("Upload percentage: " + uploader.getProgress());
                            break;
                        // This value is set after the entire media file has
                        //  been successfully uploaded.
                        case MEDIA_COMPLETE:
                            System.out.println("Upload Completed!");
                            break;
                        // This value indicates that the upload process has
                        //  not started yet.
                        case NOT_STARTED:
                            System.out.println("Upload Not Started!");
                            break;
                    }
                }
            };
            uploader.setProgressListener(progressListener);

            // Upload the image and set it as the specified video's thumbnail.
            ThumbnailSetResponse setResponse = thumbnailSet.execute();

            // Print the URL for the updated video's thumbnail image.
            System.out.println("\n================== Uploaded Thumbnail ==================\n");
            System.out.println("  - Url: " + setResponse.getItems().get(0).getDefault().getUrl());
View Full Code Here

Examples of com.googlecode.sardine.model.Set

    HttpPropPatch entity = new HttpPropPatch(url);
    // Build WebDAV <code>PROPPATCH</code> entity.
    Propertyupdate body = new Propertyupdate();
    // Add properties
    {
      Set set = new Set();
      body.getRemoveOrSet().add(set);
      Prop prop = new Prop();
      // Returns a reference to the live list
      List<Element> any = prop.getAny();
      for (Map.Entry<QName, String> entry : setProps.entrySet())
      {
        Element element = SardineUtil.createElement(entry.getKey());
        element.setTextContent(entry.getValue());
        any.add(element);
      }
      set.setProp(prop);
    }
    // Remove properties
    {
      Remove remove = new Remove();
      body.getRemoveOrSet().add(remove);
View Full Code Here

Examples of com.lyncode.xoai.dataprovider.core.Set

    public StubbedSetRepository doesNotSupportSets() {
        this.supports = false;
        return this;
    }
    public StubbedSetRepository withSet(String name, String spec) {
        this.sets.add(new Set(spec, name));
        return this;
    }
View Full Code Here

Examples of edu.cmu.cs.stage3.alice.core.Set

public abstract class SetNumberQuestion extends edu.cmu.cs.stage3.alice.core.question.NumberQuestion {
  public final SetProperty set = new SetProperty( this, "set", null );
  //protected abstract double getValue( Set set );
  protected abstract int getValue( Set set );
  public Object getValue() {
    Set setValue = set.getSetValue();
    if( setValue!=null ) {
            return new Integer( getValue( setValue ) );
    } else {
      return null;
    }
View Full Code Here

Examples of hu.sztaki.ilab.longneck.process.block.Set

        c1equals.setApplyTo("a");
        c1equals.setValue("aaa");
        c1check.setConstraints(Arrays.asList(new Constraint[] { c1equals }));
       
        // Case 1 block
        Set c1set = new Set();
        c1set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 5, 5, 0));
        far.put(c1set);
        c1set.setApplyTo("b");
        c1set.setValue("case1");       
       
        Set c1set2 = new Set();
        c1set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 6, 6, 0));
        far.put(c1set2);
        c1set2.setApplyTo("c1");
        c1set2.setValue("case1");
       
        c1.setBlocks(Arrays.asList(new Block[] { c1check, c1set, c1set2 }));
       
       
        // Case 2
        Case c2 = new Case();
        c2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 7, 7, 0));
        far.put(c2);
       
        // Case 2 check
        Check c2check = new Check();
        c2check.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 8, 8, 0));
        far.put(c2check);
       
        EqualsConstraint c2equals = new EqualsConstraint();
        c2equals.setApplyTo("a");
        c2equals.setValue("bbb");
        c2check.setConstraints(Arrays.asList(new Constraint[] { c2equals }));
       
        // Case 2 block
        Set c2set = new Set();
        c2set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 9, 9, 0));
        far.put(c2set);
        c2set.setApplyTo("b");
        c2set.setValue("case2");
       
        Set c2set2 = new Set();
        c2set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 10, 10, 0));
        far.put(c2set2);
        c2set2.setApplyTo("c2");
        c2set2.setValue("case2");
       
        c2.setBlocks(Arrays.asList(new Block[] { c2check, c2set, c2set2 }));

       
        // Case 3
        Case c3 = new Case();
        c3.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 11, 11, 0));
        far.put(c1);
       
        // Case 3 block
        Set c3set = new Set();
        c3set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 13, 13, 0));
        far.put(c3set);
        c3set.setApplyTo("b");
        c3set.setValue("case3");       
       
        Set c3set2 = new Set();
        c3set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 14, 14, 0));
        far.put(c3set2);
        c3set2.setApplyTo("c3");
        c3set2.setValue("case3");
       
        c3.setBlocks(Arrays.asList(new Block[] { c3set, c3set2 }));

        Set afterSet = new Set();
        afterSet.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 15, 15, 0));
        far.put(afterSet);
        afterSet.setApplyTo("after");
        afterSet.setValue("true");

        // Add cases to switch
        ta.setCases(Arrays.asList(new Case[] { c1, c2, c3 }));
        // Add blocks to top-level sequence       
        seq.setBlocks(Arrays.asList(new Block[] { ta, afterSet }));
View Full Code Here

Examples of jade.util.leap.Set

   * @param onto the ontology
   * @return the Set
   * @throws OntologyException
   */
  public static Set internaliseSet(AbsAggregate aggregate, Ontology onto) throws OntologyException {
    Set ret = new HashSet();

    for (int i = 0; i < aggregate.size(); i++) {
      Object element = onto.toObject(aggregate.get(i));
      // Check if the element is a Term, a primitive an AID or a List
      Ontology.checkIsTerm(element);
      ret.add(element);
    }

    return ret;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.