source: java/main/src/main/java/com/framsticks/communication/queries/UseRequest.java @ 77

Last change on this file since 77 was 77, checked in by psniegowski, 11 years ago

Add new java codebase.

File size: 640 bytes
Line 
1package com.framsticks.communication.queries;
2
3import com.framsticks.communication.Request;
4
5/**
6 * @author Piotr Sniegowski
7 */
8public class UseRequest extends ProtocolRequest {
9        protected String feature;
10
11        public UseRequest feature(String feature) {
12                this.feature = feature;
13                return this;
14        }
15
16    @Override
17        public String getCommand() {
18                return "use";
19        }
20
21    @Override
22        protected StringBuilder construct(StringBuilder buffer) {
23                return buffer.append(' ').append(feature);
24        }
25
26    @Override
27    public void parseRest(String rest) {
28        feature = rest;
29    }
30
31    public final String getFeature() {
32        return feature;
33    }
34}
Note: See TracBrowser for help on using the repository browser.