/** * create a new access right of a user for a program. * * @param user that will get a read/write permission, not null * @param program the program affected, not null * @param relation read or write permission */ public AccessRight(User user, Program program, Relation relation) { Assert.notNull(user); Assert.notNull(program); Assert.notNull(relation); this.user = user; this.program = program; this.relation = relation; }
/** * create a new program * * @param name the name of the program, not null * @param owner the user who created and thus owns the program */ public Program(String name, User owner, Robot robot) { Assert.notNull(name); Assert.notNull(owner); this.name = name; this.owner = owner; this.robot = robot; this.created = Util1.getNow(); this.lastChanged = Util1.getNow(); }
private MotorStopAction( IActorPort port, IMotorStopMode mode, BlocklyBlockProperties properties, BlocklyComment comment) { super(port, BlockTypeContainer.getByName("MOTOR_STOP_ACTION"), properties, comment); Assert.isTrue(port != null && mode != null); this.mode = mode; setReadOnly(); }
private ListGetIndex( ListElementOperations mode, IndexLocation name, List<Expr<V>> param, BlocklyBlockProperties properties, BlocklyComment comment) { super(BlockType.LIST_INDEX_OF, properties, comment); Assert.isTrue(mode != null && name != null && param != null); this.mode = mode; this.location = name; this.param = param; setReadOnly(); }
/** @return list with elements of type {@link Stmt}. */ public final List<Stmt<V>> get() { Assert.isTrue(isReadOnly()); return Collections.unmodifiableList(this.sl); }
/** * Add new element to the list. * * @param stmt */ public final void addStmt(Stmt<V> stmt) { Assert.isTrue(mayChange() && stmt != null && stmt.isReadOnly()); this.sl.add(stmt); }
public final void setT(BeanTesterSuccess t) { this.t = t; Assert.isTrue(!this.readOnly); }
public final void setS(String s) { Assert.isTrue(!this.readOnly); this.s = s; }
public final void setI(int i) { Assert.isTrue(!this.readOnly); this.i = i; }