All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jclouds.dynect.v3.domain.rdata.AAAAData Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache 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.apache.org/licenses/LICENSE-2.0
 *
 * 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.jclouds.dynect.v3.domain.rdata;

import static com.google.common.base.Preconditions.checkNotNull;

import java.beans.ConstructorProperties;
import java.util.Map;

import com.google.common.collect.ForwardingMap;
import com.google.common.collect.ImmutableMap;

/**
 * Corresponds to the binary representation of the {@code AAAA} (Address) RData
 * 
 * 

Example

* *
 * import static org.jclouds.dynect.v3.domain.rdata.NSData.aaaa;
 * ...
 * NSData rdata = aaaa("1234:ab00:ff00::6b14:abcd");
 * 
* * @see RFC 3596 */ public class AAAAData extends ForwardingMap { private final String address; @ConstructorProperties("address") private AAAAData(String address) { this.address = checkNotNull(address, "address"); this.delegate = ImmutableMap. of("address", address); } /** * a 128 bit IPv6 address */ public String getAddress() { return address; } private final transient ImmutableMap delegate; protected Map delegate() { return delegate; } public static AAAAData aaaa(String address) { return builder().address(address).build(); } public static AAAAData.Builder builder() { return new Builder(); } public AAAAData.Builder toBuilder() { return builder().from(this); } public static final class Builder { private String address; /** * @see AAAAData#getAddress() */ public AAAAData.Builder address(String address) { this.address = address; return this; } public AAAAData build() { return new AAAAData(address); } public AAAAData.Builder from(AAAAData in) { return this.address(in.getAddress()); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy