Package org.xtext.mongobeans.examples

Examples of org.xtext.mongobeans.examples.Duration


 
  public Duration getDuration() {
    List<Track> _tracks = this.getTracks();
    final Function1<Track,Duration> _function = new Function1<Track,Duration>() {
      public Duration apply(final Track it) {
        Duration _duration = it.getDuration();
        return _duration;
      }
    };
    List<Duration> _map = ListExtensions.<Track, Duration>map(_tracks, _function);
    final Function2<Duration,Duration,Duration> _function_1 = new Function2<Duration,Duration,Duration>() {
      public Duration apply(final Duration a, final Duration b) {
        Duration _plus = a.operator_plus(b);
        return _plus;
      }
    };
    Duration _reduce = IterableExtensions.<Duration>reduce(_map, _function_1);
    return _reduce;
  }
View Full Code Here


    _dbObject.put("seconds", seconds);
  }
 
  public Duration getDuration() {
    int _seconds = this.getSeconds();
    Duration _duration = new Duration(_seconds);
    return _duration;
  }
View Full Code Here

        List<Album> _albums = johnFromDb.getAlbums();
        int _size_1 = _albums.size();
        Assert.assertEquals(2, _size_1);
        List<Album> _albums_1 = johnFromDb.getAlbums();
        final Album albumFromDb = _albums_1.get(1);
        Duration _duration = albumFromDb.getDuration();
        String _string = _duration.toString();
        Assert.assertEquals("35:51", _string);
      } finally {
        mongo.close();
      }
    } catch (Throwable _e) {
View Full Code Here

    List<Track> _tracks = it.getTracks();
    Track _track = new Track();
    final Procedure1<Track> _function = new Procedure1<Track>() {
      public void apply(final Track it) {
        it.setTitle(trackTitle);
        Duration _duration = new Duration(trackDuration);
        int _seconds = _duration.getSeconds();
        it.setSeconds(_seconds);
      }
    };
    Track _doubleArrow = ObjectExtensions.<Track>operator_doubleArrow(_track, _function);
    boolean _add = _tracks.add(_doubleArrow);
View Full Code Here

TOP

Related Classes of org.xtext.mongobeans.examples.Duration

Copyright © 2018 www.massapicom. 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.