Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2014-2014 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.opensource.org/licenses/ecl2.php Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.kuali.common.core.ssh;
 
 
 
 public final class GenerateKeyPairContext {
 
 	private final String name;
 	private final Algorithm algorithm;
 
 	@Min(0)
 	private final int size;
 
 	public static GenerateKeyPairContext build() {
 		return builder().build();
 	}
 
 	public static GenerateKeyPairContext create(String name) {
 		return builder(name).build();
 	}
 
 	public static Builder builder(String name) {
 		return new Builder(name);
 	}
 
 	public static Builder builder() {
 		return new Builder();
 	}
 
 	public static class Builder extends ValidatingBuilder<GenerateKeyPairContext> {
 
 		private String name = System.getProperty("user.name");
 		private int size = 2048;
 
 		public Builder() {
 		}
 
 		public Builder(String name) {
 			this. = name;
 		}
 
 		public Builder withAlgorithm(Algorithm algorithm) {
 			this. = algorithm;
 			return this;
 		}
 
 		public Builder withSize(int size) {
 			this. = size;
 			return this;
 		}
 
 			return validate(new GenerateKeyPairContext(this));
 		}
 
 		public Algorithm getAlgorithm() {
 			return ;
 		}
 
 		public void setAlgorithm(Algorithm algorithm) {
 			this. = algorithm;
 		}
 
 		public int getSize() {
 			return ;
 		}
 
 		public void setSize(int size) {
 			this. = size;
 		}
 
 		public String getName() {
 			return ;
 		}
 	}
 
 	private GenerateKeyPairContext(Builder builder) {
 		this. = builder.algorithm;
 		this. = builder.name;
		this. = builder.size;
	}
	public String getName() {
		return ;
	}
	public Algorithm getAlgorithm() {
		return ;
	}
	public int getSize() {
		return ;
	}
New to GrepCode? Check out our FAQ X