org.crsh.cmdline.spi
Class ValueCompletion

java.lang.Object
  extended by org.crsh.cmdline.spi.ValueCompletion
All Implemented Interfaces:
Iterable<Map.Entry<String,Boolean>>

public final class ValueCompletion
extends Object
implements Iterable<Map.Entry<String,Boolean>>

A completion result.

Author:
Julien Viet

Field Summary
private  Map<String,Boolean> entries
          .
private  String prefix
          .
 
Constructor Summary
ValueCompletion()
           
ValueCompletion(String prefix)
           
ValueCompletion(String prefix, Map<String,Boolean> entries)
           
 
Method Summary
static ValueCompletion create()
           
static ValueCompletion create(String prefix)
           
static ValueCompletion create(String suffix, boolean value)
           
static ValueCompletion create(String prefix, String suffix, boolean value)
           
 boolean equals(Object obj)
           
 Object get(String key)
           
 String getPrefix()
           
 int getSize()
           
 Set<String> getSuffixes()
           
 int hashCode()
           
 boolean isEmpty()
           
 Iterator<Map.Entry<String,Boolean>> iterator()
           
 ValueCompletion put(String key, boolean value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

prefix

private final String prefix
.


entries

private final Map<String,Boolean> entries
.

Constructor Detail

ValueCompletion

public ValueCompletion()

ValueCompletion

public ValueCompletion(String prefix)

ValueCompletion

public ValueCompletion(String prefix,
                       Map<String,Boolean> entries)
Method Detail

create

public static ValueCompletion create()

create

public static ValueCompletion create(String prefix)

create

public static ValueCompletion create(String prefix,
                                     String suffix,
                                     boolean value)

create

public static ValueCompletion create(String suffix,
                                     boolean value)

iterator

public Iterator<Map.Entry<String,Boolean>> iterator()
Specified by:
iterator in interface Iterable<Map.Entry<String,Boolean>>

getSuffixes

public Set<String> getSuffixes()

isEmpty

public boolean isEmpty()

get

public Object get(String key)

getSize

public int getSize()

put

public ValueCompletion put(String key,
                           boolean value)

getPrefix

public String getPrefix()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 eXo Platform SAS. All Rights Reserved.