ANTS v2.0 API

ants.core
Class NodeAddress

java.lang.Object
  |
  +--ants.core.NodeAddress

public class NodeAddress
extends java.lang.Object

Routines for manipulating node addresses. A node address is simply a 32 bit integer for efficiency, but these convenience routines exist to convert to and from printed representations and so on.

This is just here (in ANTS) for compatiblity. All the functions are in the Janos Java NodeOS.

Author:
David Wetherall, Utah Janos Team

Method Summary
static int fromString(java.lang.String name)
          Generate a 32-bit integer from the given string address.
static boolean multicast(int a)
          Determine if the given integer address is a multicast address.
static java.lang.String toString(int a)
          Generate a string representation of the given address.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

multicast

public static final boolean multicast(int a)
Determine if the given integer address is a multicast address.

toString

public static final java.lang.String toString(int a)
Generate a string representation of the given address. Generates standard dotted-quad notation.

fromString

public static int fromString(java.lang.String name)
                      throws edu.utah.janos.nodeos.AddressFormatException
Generate a 32-bit integer from the given string address. The string must be a dotted-quad.
Throws:
edu.utah.janos.nodeos.AddressFormatException - if there aren't 4 parts, any of the 4 parts don't parse, or are out of range.

ANTS v2.0 API

This documentation is Copyright (C) 1998-2001 The University of Utah and the University of Washington. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for ANTS v2.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/